From 4ca67d912dbc3cfa90fe6889034819d45175a4ca Mon Sep 17 00:00:00 2001 From: Fynn Feldpausch Date: Tue, 24 Oct 2023 11:55:24 +0200 Subject: [PATCH] fix: update typo styles for nested links in alerts --- core/src/components/cat-alert/cat-alert.scss | 5 +++ core/src/index.html | 34 +++++++++++++++++--- core/src/styles/core/_typography.scss | 25 +++++++------- core/src/styles/utils/_color.scss | 12 ++++++- 4 files changed, 57 insertions(+), 19 deletions(-) diff --git a/core/src/components/cat-alert/cat-alert.scss b/core/src/components/cat-alert/cat-alert.scss index 590b30f5..295769d8 100644 --- a/core/src/components/cat-alert/cat-alert.scss +++ b/core/src/components/cat-alert/cat-alert.scss @@ -32,6 +32,11 @@ :host([color='#{$theme}']) { background-color: cat-token('color.theme.#{$theme}.bg'); color: cat-token('color.theme.#{$theme}.fill'); + // adjust nested links + --cat-primary-text: cat-token('color.theme.#{$theme}.fill', $wrap: false); + --cat-primary-text-hover: cat-token('color.theme.#{$theme}.fill-hover', $wrap: false); + --cat-primary-text-active: cat-token('color.theme.#{$theme}.fill-active', $wrap: false); + --cat-link-decoration: underline; } } diff --git a/core/src/index.html b/core/src/index.html index 40b88aa0..1827f3e0 100644 --- a/core/src/index.html +++ b/core/src/index.html @@ -248,21 +248,21 @@

Alert

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut - labore et dolore magna aliquyam erat, sed diam voluptua. + labore et dolore magna aliquyam erat, sed diam voluptua.

Color

-

Lorem ipsum dolor sit amet.

+

Lorem ipsum dolor dolore magna sit amet.

-

Lorem ipsum dolor sit amet.

+

Lorem ipsum dolor dolore magna sit amet.

-

Lorem ipsum dolor sit amet.

+

Lorem ipsum dolor dolore magna sit amet.

-

Lorem ipsum dolor sit amet.

+

Lorem ipsum dolor dolore magna sit amet.

Variations

@@ -1323,6 +1323,30 @@
Key Benefits Include:
  • Higher customer satisfaction
  • +
    +
    Employee Engagement
    +
    + Refers to the enthusiasm and involvement an employee has towards their work and the organization's + mission. +
    +
    Benefits of High Engagement
    +
    +
      +
    • Increased productivity and performance
    • +
    • Higher retention rates
    • +
    • Improved workplace morale
    • +
    • Enhanced company reputation
    • +
    • Higher customer satisfaction
    • +
    +
    +
    Strategies to Enhance Engagement
    +
    + Building a strong engagement strategy requires a deep understanding of the employees' needs, + aspirations, and concerns. Regular feedback, transparent communication, and consistent recognition play + pivotal roles. +
    +
    +

    Strategies to Enhance Engagement

    Building a strong engagement strategy requires a deep understanding of the employees' needs, aspirations, diff --git a/core/src/styles/core/_typography.scss b/core/src/styles/core/_typography.scss index 933f89f6..98923684 100644 --- a/core/src/styles/core/_typography.scss +++ b/core/src/styles/core/_typography.scss @@ -105,22 +105,11 @@ ul { padding-left: 2rem; } -ol, -ul, -dl { - ol, - ul, - dl { - margin-bottom: 0; - } -} - nav ol, nav ul, ol.cat-plain, ul.cat-plain { list-style: none; - margin: 0; padding: 0; } @@ -128,7 +117,7 @@ dt { font-weight: 600; } -dd { +dd:not(:last-child) { margin-bottom: 0.5rem; margin-left: 0; } @@ -241,10 +230,20 @@ code { margin-bottom: calc($cat-head-margin-bottom * 0.5 * var(--cat-article-spacer, 1)); } - :where(p, ol, ul, dl, blockquote, figure, pre, cat-alert, cat-card) { + :where(p, ol, ul, dl, blockquote, figure, pre, table, cat-alert, cat-card):not(:last-child) { margin-bottom: calc($cat-body-margin-bottom * var(--cat-article-spacer, 1)); } + ol, + ul, + dl { + ol, + ul, + dl { + margin-bottom: 0; + } + } + hr, .cat-hr { margin: calc($cat-body-margin-bottom * var(--cat-article-spacer, 1)) 0; diff --git a/core/src/styles/utils/_color.scss b/core/src/styles/utils/_color.scss index 480b5e53..0d9ccbec 100644 --- a/core/src/styles/utils/_color.scss +++ b/core/src/styles/utils/_color.scss @@ -4,6 +4,11 @@ .cat-bg-#{$name} { background-color: cat-token('color.theme.#{$name}.bg') !important; color: cat-token('color.theme.#{$name}.fill') !important; + // adjust nested links + --cat-primary-text: cat-token('color.theme.#{$name}.fill', $wrap: false); + --cat-primary-text-hover: cat-token('color.theme.#{$name}.fill-hover', $wrap: false); + --cat-primary-text-active: cat-token('color.theme.#{$name}.fill-active', $wrap: false); + --cat-link-decoration: underline; } .cat-bg-#{$name}-hover { @@ -14,6 +19,11 @@ &:hover { background-color: cat-token('color.theme.#{$name}.bgHover') !important; color: cat-token('color.theme.#{$name}.fillHover') !important; + // adjust nested links + --cat-primary-text: cat-token('color.theme.#{$name}.fill', $wrap: false); + --cat-primary-text-hover: cat-token('color.theme.#{$name}.fill-hover', $wrap: false); + --cat-primary-text-active: cat-token('color.theme.#{$name}.fill-active', $wrap: false); + --cat-link-decoration: underline; } } @@ -55,7 +65,7 @@ } .cat-bg-muted { - color: cat-token('color.ui.font.muted') !important; + background-color: cat-token('color.ui.background.muted') !important; } .cat-text-reset {