Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Add form label vars
Browse files Browse the repository at this point in the history
  • Loading branch information
imperavi committed Nov 29, 2020
1 parent c98dafd commit d581c8c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions example-project/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
--c-pre-background: #F5F5F6;
--c-pre-text: #262F3F;
--c-table-cell-border: rgba(217, 219, 221, 0.5);
--c-form-label-text: #262F3F;
--c-inline-var-text: rgba(0, 11, 29, 0.85);
--c-inline-kbd-border: rgba(0, 11, 29, 0.15);
--c-inline-kbd-text: rgba(0, 11, 29, 0.85);
Expand Down Expand Up @@ -526,6 +527,8 @@ sup {
label {
display: block;
font-size: 16px;
font-weight: normal;
color: var(--c-form-label-text);
margin-bottom: 0.15em; }
label.checkbox,
label .hint,
Expand Down
2 changes: 1 addition & 1 deletion example-project/css/main.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions example-project/scss/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ $colors: (
border: rgba(palette(neutral, light), .5)
)
),
form: (
label: (
text: palette(neutral, darker)
)
),
inline: (
var: (
text: rgba(palette(black), .85)
Expand Down Expand Up @@ -511,6 +516,13 @@ $borders: (
1: 1px
);

// =Form
$form: (
label: (
font-weight: normal
)
);

// =Radius
$radius: (
small: 2px,
Expand Down
12 changes: 12 additions & 0 deletions superkube/_vars-example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ $colors: (
border: rgba(palette(neutral, light), .5)
)
),
form: (
label: (
text: palette(neutral, darker)
)
),
inline: (
var: (
text: rgba(palette(black), .85)
Expand Down Expand Up @@ -277,6 +282,13 @@ $colors-dark: ();
// =Border
$borders: ();

// =Form
$form: (
label: (
font-weight: normal
)
);

// =Radius
$radius: (
small: 2px,
Expand Down
2 changes: 2 additions & 0 deletions superkube/base/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ sup {
label {
display: block;
font-size: type-size(form, label);
font-weight: map-deep-get($form, label, font-weight);
color: color(form, label, text);
margin-bottom: 0.15em;

&.checkbox,
Expand Down

0 comments on commit d581c8c

Please sign in to comment.