Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: errormessage, heading, ingress, label css #2433

Merged
merged 15 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 138 additions & 161 deletions packages/css/baseline/typography.css
Original file line number Diff line number Diff line change
@@ -1,125 +1,114 @@
/** Heading */
.ds-heading {
--dsc-bottom-spacing: var(--ds-spacing-6);
--dsc-bottom-spacing: var(--ds-spacing-4);

margin: 0;
color: var(--ds-color-neutral-text-default);
}

.ds-heading--spacing {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-heading--2xs {
--dsc-bottom-spacing: var(--ds-spacing-1);
font-size: var(--ds-heading-md-font-size);
font-weight: var(--ds-heading-md-font-weight);
letter-spacing: var(--ds-heading-md-letter-spacing);
line-height: var(--ds-heading-md-line-height);
margin: 0;

font-weight: var(--ds-heading-2xs-font-weight);
line-height: var(--ds-heading-2xs-line-height);
font-size: var(--ds-heading-2xs-font-size);
letter-spacing: var(--ds-heading-2xs-letter-spacing);
}
&[data-spacing] {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-heading--xs {
--dsc-bottom-spacing: var(--ds-spacing-2);
&[data-size='2xs'] {
--dsc-bottom-spacing: var(--ds-spacing-1);

font-weight: var(--ds-heading-xs-font-weight);
line-height: var(--ds-heading-xs-line-height);
font-size: var(--ds-heading-xs-font-size);
letter-spacing: var(--ds-heading-xs-letter-spacing);
}
font-weight: var(--ds-heading-2xs-font-weight);
line-height: var(--ds-heading-2xs-line-height);
font-size: var(--ds-heading-2xs-font-size);
letter-spacing: var(--ds-heading-2xs-letter-spacing);
}

.ds-heading--sm {
--dsc-bottom-spacing: var(--ds-spacing-3);
&[data-size='xs'] {
--dsc-bottom-spacing: var(--ds-spacing-2);

font-weight: var(--ds-heading-sm-font-weight);
line-height: var(--ds-heading-sm-line-height);
font-size: var(--ds-heading-sm-font-size);
letter-spacing: var(--ds-heading-sm-letter-spacing);
}
font-weight: var(--ds-heading-xs-font-weight);
line-height: var(--ds-heading-xs-line-height);
font-size: var(--ds-heading-xs-font-size);
letter-spacing: var(--ds-heading-xs-letter-spacing);
}

.ds-heading--md {
--dsc-bottom-spacing: var(--ds-spacing-4);
&[data-size='sm'] {
--dsc-bottom-spacing: var(--ds-spacing-3);

font-weight: var(--ds-heading-md-font-weight);
line-height: var(--ds-heading-md-line-height);
font-size: var(--ds-heading-md-font-size);
letter-spacing: var(--ds-heading-md-letter-spacing);
}
font-weight: var(--ds-heading-sm-font-weight);
line-height: var(--ds-heading-sm-line-height);
font-size: var(--ds-heading-sm-font-size);
letter-spacing: var(--ds-heading-sm-letter-spacing);
}

.ds-heading--lg {
--dsc-bottom-spacing: var(--ds-spacing-5);
&[data-size='lg'] {
--dsc-bottom-spacing: var(--ds-spacing-5);

font-weight: var(--ds-heading-lg-font-weight);
line-height: var(--ds-heading-lg-line-height);
font-size: var(--ds-heading-lg-font-size);
letter-spacing: var(--ds-heading-lg-letter-spacing);
}
font-weight: var(--ds-heading-lg-font-weight);
line-height: var(--ds-heading-lg-line-height);
font-size: var(--ds-heading-lg-font-size);
letter-spacing: var(--ds-heading-lg-letter-spacing);
}

.ds-heading--xl {
--dsc-bottom-spacing: var(--ds-spacing-6);
&[data-size='xl'] {
--dsc-bottom-spacing: var(--ds-spacing-6);

font-weight: var(--ds-heading-xl-font-weight);
line-height: var(--ds-heading-xl-line-height);
font-size: var(--ds-heading-xl-font-size);
letter-spacing: var(--ds-heading-xl-letter-spacing);
}
font-weight: var(--ds-heading-xl-font-weight);
line-height: var(--ds-heading-xl-line-height);
font-size: var(--ds-heading-xl-font-size);
letter-spacing: var(--ds-heading-xl-letter-spacing);
}

.ds-heading--2xl {
--dsc-bottom-spacing: var(--ds-spacing-7);
&[data-size='2xl'] {
--dsc-bottom-spacing: var(--ds-spacing-7);

font-weight: var(--ds-heading-2xl-font-weight);
line-height: var(--ds-heading-2xl-line-height);
font-size: var(--ds-heading-2xl-font-size);
letter-spacing: var(--ds-heading-2xl-letter-spacing);
font-weight: var(--ds-heading-2xl-font-weight);
line-height: var(--ds-heading-2xl-line-height);
font-size: var(--ds-heading-2xl-font-size);
letter-spacing: var(--ds-heading-2xl-letter-spacing);
}
}

/** Ingress */

.ds-ingress {
--dsc-bottom-spacing: var(--ds-spacing-5);

margin: 0;
color: var(--ds-color-neutral-text-default);
}

.ds-ingress--spacing {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-ingress--xs {
--dsc-bottom-spacing: var(--ds-spacing-8);
font-size: var(--ds-ingress-md-font-size);
font-weight: var(--ds-ingress-md-font-weight);
letter-spacing: var(--ds-ingress-md-letter-spacing);
line-height: var(--ds-ingress-md-line-height);
margin: 0;

font-weight: var(--ds-ingress-xs-font-weight);
line-height: var(--ds-ingress-xs-line-height);
font-size: var(--ds-ingress-xs-font-size);
letter-spacing: var(--ds-ingress-xs-letter-spacing);
}
&[data-spacing] {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-ingress--sm {
--dsc-bottom-spacing: var(--ds-spacing-7);
&[data-size='xs'] {
--dsc-bottom-spacing: var(--ds-spacing-8);

font-weight: var(--ds-ingress-sm-font-weight);
line-height: var(--ds-ingress-sm-line-height);
font-size: var(--ds-ingress-sm-font-size);
letter-spacing: var(--ds-ingress-sm-letter-spacing);
}
font-weight: var(--ds-ingress-xs-font-weight);
line-height: var(--ds-ingress-xs-line-height);
font-size: var(--ds-ingress-xs-font-size);
letter-spacing: var(--ds-ingress-xs-letter-spacing);
}

.ds-ingress--md {
--dsc-bottom-spacing: var(--ds-spacing-5);
&[data-size='sm'] {
--dsc-bottom-spacing: var(--ds-spacing-7);

font-weight: var(--ds-ingress-md-font-weight);
line-height: var(--ds-ingress-md-line-height);
font-size: var(--ds-ingress-md-font-size);
letter-spacing: var(--ds-ingress-md-letter-spacing);
}
font-weight: var(--ds-ingress-sm-font-weight);
line-height: var(--ds-ingress-sm-line-height);
font-size: var(--ds-ingress-sm-font-size);
letter-spacing: var(--ds-ingress-sm-letter-spacing);
}

.ds-ingress--lg {
--dsc-bottom-spacing: var(--ds-spacing-6);
&[data-size='lg'] {
--dsc-bottom-spacing: var(--ds-spacing-6);

font-weight: var(--ds-ingress-lg-font-weight);
line-height: var(--ds-ingress-lg-line-height);
font-size: var(--ds-ingress-lg-font-size);
letter-spacing: var(--ds-ingress-lg-letter-spacing);
font-weight: var(--ds-ingress-lg-font-weight);
line-height: var(--ds-ingress-lg-line-height);
font-size: var(--ds-ingress-lg-font-size);
letter-spacing: var(--ds-ingress-lg-letter-spacing);
}
}

/** Paragraph */
Expand Down Expand Up @@ -308,103 +297,92 @@
}

/** Label */

.ds-label {
--dsc-bottom-spacing: var(--ds-spacing-1);

color: var(--ds-color-neutral-text-default);
display: inline-block;
font-size: var(--ds-label-md-font-size);
font-weight: var(--ds-label-md-font-weight);
letter-spacing: var(--ds-label-md-letter-spacing);
line-height: var(--ds-label-md-line-height);
margin: 0;
padding: 0;
color: var(--ds-color-neutral-text-default);
}

.ds-label--spacing {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-label--xs {
font-weight: var(--ds-label-xs-font-weight);
line-height: var(--ds-label-xs-line-height);
font-size: var(--ds-label-xs-font-size);
letter-spacing: var(--ds-label-xs-letter-spacing);
}
&[data-spacing] {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-label--sm {
font-weight: var(--ds-label-sm-font-weight);
line-height: var(--ds-label-sm-line-height);
font-size: var(--ds-label-sm-font-size);
letter-spacing: var(--ds-label-sm-letter-spacing);
}
&[data-size='xs'] {
font-weight: var(--ds-label-xs-font-weight);
line-height: var(--ds-label-xs-line-height);
font-size: var(--ds-label-xs-font-size);
letter-spacing: var(--ds-label-xs-letter-spacing);
}

.ds-label--md {
font-weight: var(--ds-label-md-font-weight);
line-height: var(--ds-label-md-line-height);
font-size: var(--ds-label-md-font-size);
letter-spacing: var(--ds-label-md-letter-spacing);
}
&[data-size='sm'] {
font-weight: var(--ds-label-sm-font-weight);
line-height: var(--ds-label-sm-line-height);
font-size: var(--ds-label-sm-font-size);
letter-spacing: var(--ds-label-sm-letter-spacing);
}

.ds-label--lg {
font-weight: var(--ds-label-lg-font-weight);
line-height: var(--ds-label-lg-line-height);
font-size: var(--ds-label-lg-font-size);
letter-spacing: var(--ds-label-lg-letter-spacing);
&[data-size='lg'] {
font-weight: var(--ds-label-lg-font-weight);
line-height: var(--ds-label-lg-line-height);
font-size: var(--ds-label-lg-font-size);
letter-spacing: var(--ds-label-lg-letter-spacing);
}
}

/** Error message */

/** Validation message */
.ds-validation-message {
--dsc-bottom-spacing: var(--ds-spacing-5);

font-size: var(--ds-error_message-md-font-size);
font-weight: var(--ds-error_message-md-font-weight);
letter-spacing: var(--ds-error_message-md-letter-spacing);
line-height: var(--ds-error_message-md-line-height);
margin: 0;
}

.ds-validation-message--error {
color: var(--ds-color-danger-text-subtle);
}

.ds-validation-message--spacing {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-validation-message--xs {
--dsc-bottom-spacing: var(--ds-spacing-3);
&[data-error] {
color: var(--ds-color-danger-text-subtle);
}

font-weight: var(--ds-error_message-xs-font-weight);
line-height: var(--ds-error_message-xs-line-height);
font-size: var(--ds-error_message-xs-font-size);
letter-spacing: var(--ds-error_message-xs-letter-spacing);
}
&[data-spacing] {
margin-bottom: var(--dsc-bottom-spacing);
}

.ds-validation-message--sm {
--dsc-bottom-spacing: var(--ds-spacing-4);
&[data-size='xs'] {
--dsc-bottom-spacing: var(--ds-spacing-3);

font-weight: var(--ds-error_message-sm-font-weight);
line-height: var(--ds-error_message-sm-line-height);
font-size: var(--ds-error_message-sm-font-size);
letter-spacing: var(--ds-error_message-sm-letter-spacing);
}
font-weight: var(--ds-error_message-xs-font-weight);
line-height: var(--ds-error_message-xs-line-height);
font-size: var(--ds-error_message-xs-font-size);
letter-spacing: var(--ds-error_message-xs-letter-spacing);
}

.ds-validation-message--md {
--dsc-bottom-spacing: var(--ds-spacing-5);
&[data-size='sm'] {
--dsc-bottom-spacing: var(--ds-spacing-4);

font-weight: var(--ds-error_message-md-font-weight);
line-height: var(--ds-error_message-md-line-height);
font-size: var(--ds-error_message-md-font-size);
letter-spacing: var(--ds-error_message-md-letter-spacing);
}
font-weight: var(--ds-error_message-sm-font-weight);
line-height: var(--ds-error_message-sm-line-height);
font-size: var(--ds-error_message-sm-font-size);
letter-spacing: var(--ds-error_message-sm-letter-spacing);
}

.ds-validation-message--lg {
--dsc-bottom-spacing: var(--ds-spacing-5);
&[data-size='lg'] {
--dsc-bottom-spacing: var(--ds-spacing-5);

font-weight: var(--ds-error_message-lg-font-weight);
line-height: var(--ds-error_message-lg-line-height);
font-size: var(--ds-error_message-lg-font-size);
letter-spacing: var(--ds-error_message-lg-letter-spacing);
font-weight: var(--ds-error_message-lg-font-weight);
line-height: var(--ds-error_message-lg-line-height);
font-size: var(--ds-error_message-lg-font-size);
letter-spacing: var(--ds-error_message-lg-letter-spacing);
}
}

/** Font weight
** used for weight on Label */

.ds-font-weight--medium {
font-weight: var(--ds-font-weight-medium);
}
Expand All @@ -419,7 +397,6 @@

/** Line height
** used for long, short Paragraph */

.ds-line-height--sm {
line-height: var(--ds-line-height-sm);
}
Expand Down
Loading
Loading