fix: use typography variables instead
explicit since composing is not allowed in nested selectors
This commit is contained in:
@@ -1,21 +1,40 @@
|
||||
.label {
|
||||
composes: Body-Paragraph-mdRegular from '../Typography/typography.module.css';
|
||||
font-family:
|
||||
var(--Body-Paragraph-Font-family), var(--Body-Paragraph-Font-fallback);
|
||||
font-size: var(--Body-Paragraph-Size);
|
||||
font-weight: var(--Body-Paragraph-Font-weight);
|
||||
letter-spacing: var(--Body-Paragraph-Letter-spacing);
|
||||
text-transform: unset;
|
||||
line-height: 1.5;
|
||||
text-decoration: none;
|
||||
|
||||
transition: font-size 100ms ease;
|
||||
text-align: left;
|
||||
color: var(--Text-Interactive-Placeholder);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
&.small {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
&.regular {
|
||||
font-size: 16px;
|
||||
}
|
||||
.small {
|
||||
font-family: var(--Label-Font-family), var(--Label-Font-fallback);
|
||||
font-size: var(--Label-Size);
|
||||
font-weight: var(--Label-Font-weight);
|
||||
letter-spacing: var(--Label-Letter-spacing);
|
||||
text-transform: unset;
|
||||
line-height: 1.5;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.discreet {
|
||||
composes: Body-Supporting-text-caption-smBold from '../Typography/typography.module.css';
|
||||
font-family:
|
||||
var(--Body-Supporting-text-Font-family),
|
||||
var(--Body-Supporting-text-Font-fallback);
|
||||
font-size: var(--Body-Supporting-text-Size);
|
||||
font-weight: var(--Body-Supporting-text-Font-weight-2);
|
||||
letter-spacing: var(--Body-Supporting-text-Letter-spacing);
|
||||
text-transform: unset;
|
||||
line-height: 1.4;
|
||||
text-decoration: none;
|
||||
|
||||
color: var(--Text-Default);
|
||||
order: unset;
|
||||
}
|
||||
@@ -31,7 +50,14 @@ textarea:focus,
|
||||
textarea:placeholder-shown,
|
||||
textarea[value]:not([value='']) {
|
||||
& ~ .label {
|
||||
font-size: 12px;
|
||||
font-family: var(--Label-Font-family), var(--Label-Font-fallback);
|
||||
font-size: var(--Label-Size);
|
||||
font-weight: var(--Label-Font-weight);
|
||||
letter-spacing: var(--Label-Letter-spacing);
|
||||
text-transform: unset;
|
||||
line-height: 1.5;
|
||||
text-decoration: none;
|
||||
|
||||
margin-bottom: var(--Space-x05);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +71,14 @@ textarea:disabled {
|
||||
|
||||
@media (hover: hover) {
|
||||
input:active:not(:disabled) ~ .label {
|
||||
font-size: 12px;
|
||||
font-family: var(--Label-Font-family), var(--Label-Font-fallback);
|
||||
font-size: var(--Label-Size);
|
||||
font-weight: var(--Label-Font-weight);
|
||||
letter-spacing: var(--Label-Letter-spacing);
|
||||
text-transform: unset;
|
||||
line-height: 1.5;
|
||||
text-decoration: none;
|
||||
|
||||
margin-bottom: var(--Space-x05);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user