Skip to content

Commit

Permalink
fix(feat-stories-cleanup): in accordion and blockquote
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari Nez committed Sep 27, 2024
1 parent 7da6331 commit cbd313f
Show file tree
Hide file tree
Showing 16 changed files with 253 additions and 14 deletions.
42 changes: 35 additions & 7 deletions src/components/accordion/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
content: '';
display: block;
position: absolute;
background: var(--tabs-color-text-default);
background: var(--accordion-color-header);
border-radius: var(--spacing-md);
inset: 0 0 0 auto;
margin: auto;
Expand All @@ -35,7 +35,7 @@
&:hover {
&::before,
&::after {
background-color: var(--color-primary-default);
background-color: var(--accordion-color-header-hover);
}
}

Expand Down Expand Up @@ -84,10 +84,16 @@
padding: 0 var(--spacing-xl) 0 0;
position: relative;
cursor: pointer;
text-transform: none;
}

&:hover {
color: var(--color-primary-default);
color: var(--accordion-color-header-hover);

&::before,
&::after {
background: var(--accordion-color-header-hover);
}
}
}

Expand All @@ -101,11 +107,13 @@
cursor: pointer;
padding: 0 var(--spacing-xl) 0 0;
line-height: var(--line-height-tight);
font-weight: var(--font-weight-primary-regular);
text-transform: none;
}

&:hover,
&:focus {
color: var(--color-primary-default);
&::before,
&::after {
background: var(--accordion-color-header-hover);
}

&::before {
Expand All @@ -121,13 +129,32 @@
right: var(--spacing-sm);
}

&:hover,
&:focus {
text-decoration: none;

&::before,
&::after {
background: var(--accordion-color-header);
}
}

&--collapse {
&::before {
display: none;
}
}
}

.button[data-button-style='clean'].accordion__toggle-all {
color: var(--accordion-color-header-hover);

&:hover,
&:focus {
color: var(--accordion-color-header);
}
}

.accordion__icon {
height: var(--spacing-lg);
width: var(--spacing-lg);
Expand All @@ -150,9 +177,10 @@

display: flex;
margin: 0;
font-weight: var(--font-weight-primary-regular);

&:hover {
color: clr(primary);
color: var(--accordion-color-header-hover);
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/components/blockquote/blockquote.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.blockquote {
width: 573px;
padding: var(--blockquote-padding-x) 0;
padding: var(--block-quote-padding-x) 0;
}

.blockquote__quote {
Expand All @@ -20,12 +20,12 @@

.blockquote__blockquote {
[data-blockquote-style='bar-left'] & {
padding-left: var(--blockquote-padding-x);
padding-left: var(--block-quote-padding-x);
border-left: var(--size-md) solid var(--color-text-body);
}

[data-blockquote-style='bar-right'] & {
padding-right: var(--blockquote-padding-x);
padding-right: var(--block-quote-padding-x);
border-right: var(--size-md) solid var(--color-text-body);
text-align: right;
}
Expand All @@ -42,7 +42,7 @@
}

.blockquote__quote p {
margin: var(--blockquote-padding-y) var(--paragraph-spacing-0);
margin: var(--block-quote-padding-y) var(--paragraph-spacing-0);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/text/text/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%blockquote,
.blockquote {
border-left: 4px solid var(--colors-text-body);
font-family: var(--font-families-secondary);
font-family: var(--font-family-secondary);
font-size: var(--font-size-h5);
padding: var(--spacing-lg) var(--spacing-xl);
}
Expand Down
2 changes: 0 additions & 2 deletions src/tokens/tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@
--main-menu-color-dropdown-label: #0080b7;
--main-menu-color-dropdown-label-hover: #006089;
--link-color-default: #005f89;
--link-color-inverse: #fff;
--link-color-hover: #00202e;
--link-color-inverse-hover: #9ce1ff;
--link-body: [object Object];
--input-gap: 0.5rem;
--input-padding-x: 1rem;
Expand Down
16 changes: 16 additions & 0 deletions tokens/undefined/border-radius-tokens.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div>
<h2 class="sb-title">Border Radius Tokens</h2>

<ul class="sb-list">
{% for radius, value in _context.radius %}
<li class="sb-list__item">
<span class="sb-list__label">{{radius}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class="sb-custom-property-name">var(--radius-{{radius}})</code>
</span>
<span class="sb-list__visualization" style="border-radius: {{value.value}}px; width: 75px; height: 75px; background: var(--colors-sb-visualization);"></span>
</li>
{% endfor %}
</ul>
</div>
16 changes: 16 additions & 0 deletions tokens/undefined/borders.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div>
<h2 class="sb-title">Border Tokens</h2>

<ul class="sb-list">
{% for border, value in _context.border %}
<li class="sb-list__item">
<span class="sb-list__label">{{border}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--border-{{border}})</code>
</span>
<span class="sb-list__visualization" style="height: {{value.value}}px; background-color: var(--colors-sb-visualization); width: 300px;"></span>
</li>
{% endfor %}
</ul>
</div>
16 changes: 16 additions & 0 deletions tokens/undefined/breakpoints.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div>
<h2 class="sb-title">Breakpoint Tokens</h2>

<ul class="sb-list" style="overflow: scroll;">
{% for breakpoint, value in _context.breakpoint %}
<li class="sb-list__item" style="min-width: max-content;">
<span class="sb-list__label">{{breakpoint}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--breakpoint-{{breakpoint}})</code>
</span>
<span class="sb-list__visualization" style="width: {{value.value}}px; height: 25px; background: var(--colors-sb-visualization); display: block; border-radius: var(--radius-sm);"></span>
</li>
</li>
</li>
{% endfor %}</ul></div>
45 changes: 45 additions & 0 deletions tokens/undefined/color.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<div>
<h2 class="sb-title">Colors</h2>

{% for color, value in _context.colors %}
<h2 class="sb-subtitle">{{ color }}</h2>
{% if value.value is defined %}
<ul class="sb-list">
<li class="sb-list__item" class="token-card">
<span class="sb-list__label">{{ color }}</span>
<span class="sb-list__value">{{value.value}}</span>
<span class="sb-list__custom-property">
<code class="sb-custom-property-name">var(--color-{{color}})</code>
</span>
<span class="sb-list__visualization" style="background-color: var(--color-{{color}});"></span>
</li>
</ul>
{% else %}
<ul class="sb-list">
{% for nestedColor, nestedValue in value %}
{% if nestedValue.value is defined %}
<li class="sb-list__item" class="token-card">
<span class="sb-list__label">{{ nestedColor }}</span>
<span class="sb-list__value">{{nestedValue.value}}</span>
<span class="sb-list__custom-property">
<code class="sb-custom-property-name">var(--color-{{ color|lower }}-{{nestedColor}})</code>
</span>
<span class="sb-list__visualization" style="background-color: var(--color-{{ color|lower }}-{{nestedColor}});"></span>
</li>
{% else %}
{% for colorFamily, colorFamilyValue in nestedValue %}
<li class="sb-list__item" class="token-card">
<span class="sb-list__label">{{ nestedColor }} {{ colorFamily }}</span>
<span class="sb-list__value">{{ colorFamilyValue.value }}</span>
<span class="sb-list__custom-property">
<code class="sb-custom-property-name">var(--color-{{ color|lower }}-{{ nestedColor }}-{{colorFamily}})</code>
</span>
<span class="sb-list__visualization" style="background-color: var(--color-{{ color|lower }}-{{ nestedColor }}-{{colorFamily}});"></span>
</li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
18 changes: 18 additions & 0 deletions tokens/undefined/line-height.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% set text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." %}

<div>
<h2 class="sb-title">Line Heights</h2>

<ul class="sb-list" style="overflow: scroll;">
{% for lineHeight, value in _context.lineHeight|reverse %}
<li class="sb-list__item" style="min-width: max-content;">
<span class="sb-list__label" style="width: 100px;">{{lineHeight}}</span>
<span class="sb-list__value">{{value.value}}</span>
<span class="sb-list__custom-property" style="width: 272px;">
<code class="sb-custom-property-name">var(--line-heights-{{lineHeight}})</code>
</span>
<span class="sb-list__visualization" style="max-width: 600px; line-height:var(--line-height-{{lineHeight}})">{{text}}</span>
</li>
{% endfor %}
</ul>
</div>
11 changes: 11 additions & 0 deletions tokens/undefined/motion.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="motion">
<h2>Motion</h2>
<div class="motion__grid">
{% for motion in motions %}
<div class="motion__grid-item">
<h3>{{ motion.name }}</h3>
<div class="demo-motion demo-motion--{{ motion.name|lower|replace({' ':'-'}) }}"></div>
</div>
{% endfor %}
</div>
</div>
16 changes: 16 additions & 0 deletions tokens/undefined/opacity.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div>
<h2 class="sb-title">Opacity Tokens</h2>

<ul class="sb-list">
{% for opacity, value in _context.opacity %}
<li class="sb-list__item">
<span class="sb-list__label">{{opacity}}</span>
<span class="sb-list__value">{{value.value}}</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--radius-{{opacity}})</code>
</span>
<span class="sb-list__visualization" style="opacity: {{value.value}}; display: block; width: 50px; height: 50px; background-color: var(--colors-sb-visualization); border-radius: var(--radius-sm);"></span>
</li>
{% endfor %}
</ul>
</div>
16 changes: 16 additions & 0 deletions tokens/undefined/sizes.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<div>
<h2 class="sb-title">Size Tokens</h2>

<ul class="sb-list">
{% for size, value in _context.size %}
<li class="sb-list__item">
<span class="sb-list__label">{{size}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--size-{{size}})</code>
</span>
<span class="sb-list__visualization" style="width: {{value.value}}px; height: {{value.value}}px; background-color: var(--colors-sb-visualization);"></span>
</li>
{% endfor %}
</ul>
</div>
21 changes: 21 additions & 0 deletions tokens/undefined/spacing.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div>
<h2 class="sb-title">Spacing Tokens</h2>

<ul class="sb-list">
{% for spacing, value in _context.spacing %}
<li class="sb-list__item">
<span class="sb-list__label">{{spacing}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--spacing-{{spacing}})</code>
</span>

<ul class="sb-spacing-wrapper" style="gap: {{value.value}}px; padding-left: 0;">
{% for i in [1,1,1,1,1,1,1] %}
<li class="sb-list__visualization" style="width: 50px; height: 50px; background-color: var(--colors-sb-visualization);"></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</div>
15 changes: 15 additions & 0 deletions tokens/undefined/type-faces.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div>
<h2 class="sb-title">Type Faces</h2>

<ul class="sb-list">
{% for fontFamily, value in _context.fontFamily %}
<li class="sb-list__item">
<span class="sb-list__value">{{value.value}}</span>
<span class="sb-list__custom-property">
<code class="sb-custom-property-name">var(--font-family-{{fontFamily}})</code>
</span>
<h2 class="sb-list__label" style="font-family: {{value.value}};">{{fontFamily}}</h2>
</li>
{% endfor %}
</ul>
</div>
18 changes: 18 additions & 0 deletions tokens/undefined/type-scale.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div>
<h2 class="sb-title">Type Scale</h2>

<ul class="sb-list">
{% for fontSize, value in _context.fontSize|reverse %}
<li class="sb-list__item">
<span class="sb-list__label">{{fontSize}}</span>
<span class="sb-list__value">{{value.value}}px</span>
<span class="sb-list__custom-property">
<code class=" sb-custom-property-name">var(--font-size-{{fontSize}})</code>
</span>

<p style="font-size: var(--font-size-{{fontSize}}); margin: 0;">{{fontSize|capitalize}}
</p>
</li>
{% endfor %}
</ul>
</div>
5 changes: 5 additions & 0 deletions util/undefined/controlData.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
color_variant:
- 'base'
- 'dark'
- 'light'
- 'bright'

0 comments on commit cbd313f

Please sign in to comment.