-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update fress-style form sample (#10207)
Show-case how applications can apply styles to get better alignment in specific scenarios. By default, you get this misalignment due to the touch areas of these kind of components - Switch, CheckBox, Radio. While the components are implemented by design, the misalignment, shown below, should be definitely addressed. With few lines of CSS, applying small negative margins to shift the components to the left, you can get the perfect alignment.
- Loading branch information
Showing
3 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
packages/website/docs/_samples/main/Form/FreeStyleForm/FreeStyleForm.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import html from '!!raw-loader!./sample.html'; | ||
import js from '!!raw-loader!./main.js'; | ||
import css from '!!raw-loader!./main.css'; | ||
|
||
<Editor html={html} js={js} /> | ||
<Editor html={html} js={js} css={css} /> |
13 changes: 13 additions & 0 deletions
13
packages/website/docs/_samples/main/Form/FreeStyleForm/main.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
:root { | ||
--my-margin: -0.6875rem; | ||
} | ||
.ui5-content-density-compact { | ||
--my-margin: -0.5rem; | ||
} | ||
|
||
.margin--density-aware { | ||
margin-inline-start: var(--my-margin); | ||
} | ||
.margin--fixed { | ||
margin-inline-start: -0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters