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

feat: design tokens #1310

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3ed8c94
fix: remove obsolete css vars
zetareticoli Dec 19, 2024
143b5dc
fix: remove obsolete sass vars
zetareticoli Dec 19, 2024
76ee3e2
feat: import tokens in variables section
zetareticoli Dec 19, 2024
b81b944
fix: disable gradients mixin as not used
zetareticoli Dec 19, 2024
69f3aec
feat: add css vars
zetareticoli Dec 20, 2024
a0b2814
feat: remove sass prefix
zetareticoli Dec 27, 2024
0e6eec2
Merge branch 'main' into feat/design-tokens
astagi Dec 30, 2024
f81a3e3
refactor: change tokens import
zetareticoli Jan 2, 2025
e573e2e
fix: remove unprefixed vars
zetareticoli Jan 2, 2025
eed5565
Merge branch 'main' into feat/design-tokens
astagi Jan 2, 2025
68a9f52
fix: remove duplicate vars
zetareticoli Jan 2, 2025
3a4affd
feat: add status map
zetareticoli Jan 2, 2025
7272866
fix: vars reference
zetareticoli Jan 2, 2025
4a9a5b4
feat: accordion vars
zetareticoli Jan 2, 2025
cb4e4d6
feat: alert vars
zetareticoli Jan 2, 2025
311228b
refactor: alphabetical order and tokens import
zetareticoli Jan 3, 2025
6f2b2a7
fix: restore gradient mixin
zetareticoli Jan 3, 2025
0c8a8f6
refactor: restore bs variables and add token prefix
zetareticoli Jan 3, 2025
da99d5c
fix: restore bs variables and tokens sass import
zetareticoli Jan 3, 2025
7062e95
refactor: component acceptoverlay
zetareticoli Jan 3, 2025
0d5c5f2
refactor: component alert
zetareticoli Jan 3, 2025
16e9884
refactor: status variants, icons and space
zetareticoli Jan 8, 2025
029d09e
feat: add icon spacing global var
zetareticoli Jan 8, 2025
d2e4b43
fix: remove for cycle
zetareticoli Jan 8, 2025
c9f1d66
fix: remove class
zetareticoli Jan 8, 2025
611c25d
refactor: color order
zetareticoli Jan 8, 2025
9abc7d7
feat: update line-height
zetareticoli Jan 8, 2025
267f8d7
refactor: change theme var name
zetareticoli Jan 8, 2025
f985479
fix: remove old vars
zetareticoli Jan 8, 2025
67619c3
refactor: icons
zetareticoli Jan 10, 2025
3503afa
refactor: avatar variables
zetareticoli Jan 10, 2025
8cfc1f8
refactor: back to top
zetareticoli Jan 12, 2025
0282916
fix: px to rem
zetareticoli Jan 14, 2025
349085e
fix: icon variables
zetareticoli Jan 14, 2025
4f71639
fix: comment tokens .scss
zetareticoli Jan 14, 2025
c7d06fe
fix: remove theme-
zetareticoli Jan 14, 2025
89de617
fix: change font family variable
zetareticoli Jan 14, 2025
e554bb9
refactor: avatar status and presence
zetareticoli Jan 14, 2025
5b1edb2
refactor: optimize code
zetareticoli Jan 14, 2025
afddf4e
fix: remove custom color variants
zetareticoli Jan 15, 2025
baa43d9
refactor: avatar size
zetareticoli Jan 15, 2025
9d78eb5
refactor: avatar dropdown, hover and group
zetareticoli Jan 16, 2025
0c9bfea
Merge remote-tracking branch 'origin/main' into feat/design-tokens
astagi Jan 17, 2025
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
21 changes: 16 additions & 5 deletions docs/componenti/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ Gli avvisi sono disponibili in quattro tipologie diverse e sono adatti a qualsia

{% comment %}Example name: Varianti per tipologia{% endcomment %}
{% capture example %}
{% assign colors = "primary,info,success,warning,danger" | split: ','%}
{% for color in colors %}

<div class="alert alert-{{color}}" role="alert">
Questo è un alert di tipo "<b>{{ color }}</b>".
</div>{% endfor %}
<div class="alert alert-primary" role="alert">
<p class="mb-0"><svg class="alert-icon icon"><use href="/dist/svg/sprites.svg#it-info-circle"></use></svg> Questo è un alert di tipo "<strong>primary</strong>".</p>
</div>
<div class="alert alert-info" role="alert">
<p class="mb-0"><svg class="alert-icon icon"><use href="/dist/svg/sprites.svg#it-info-circle"></use></svg> Questo è un alert di tipo "<strong>info</strong>".</p>
</div>
<div class="alert alert-success" role="alert">
<p class="mb-0"><svg class="alert-icon icon"><use href="/dist/svg/sprites.svg#it-check-circle"></use></svg> Questo è un alert di tipo "<strong>success</strong>".</p>
</div>
<div class="alert alert-warning" role="alert">
<p class="mb-0"><svg class="alert-icon icon"><use href="/dist/svg/sprites.svg#it-warning-circle"></use></svg> Questo è un alert di tipo "<strong>warning</strong>".</p>
</div>
<div class="alert alert-danger" role="alert">
<p class="mb-0"><svg class="alert-icon icon"><use href="/dist/svg/sprites.svg#it-error"></use></svg> Questo è un alert di tipo "<strong>danger</strong>".</p>
</div>

{% endcapture %}
{% include example.html content=example %}

Expand Down
27 changes: 8 additions & 19 deletions docs/componenti/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ L'elemento Avatar è la rappresentazione grafica di un utente e può includere u

Gli Avatar sono disponibili in sei diverse dimensioni:

- **xs** con classe `size-xs`
<!-- - **xs** con classe `size-xs` -->
- **sm** con classe `size-sm`
- **md** (dimensioni di default) `size-md`
- **lg** con classe `size-lg`
Expand Down Expand Up @@ -59,9 +59,6 @@ L'Avatar ridimensiona automaticamente l'immagine adattandola al formato circolar
{% capture example %}

<div class="d-flex align-items-center justify-content-around flex-wrap flex-sm-nowrap">
<div class="avatar size-xs">
<img src="https://randomuser.me/api/portraits/men/46.jpg" alt="Mario Rossi">
</div>
<div class="avatar size-sm">
<img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Luisa Neri">
</div>
Expand All @@ -75,7 +72,7 @@ L'Avatar ridimensiona automaticamente l'immagine adattandola al formato circolar
<img src="https://randomuser.me/api/portraits/men/33.jpg" alt="Carlo Poli">
</div>
<div class="avatar size-xxl">
<img src="https://randomuser.me/api/portraits/women/24.jpg" alt="Giovanna Ferrero">
<img src="https://randomuser.me/api/portraits/women/90.jpg" alt="Giovanna Ferrero">
</div>
</div>

Expand All @@ -98,10 +95,6 @@ In questi casi il testo sarà di colore bianco.
{% capture example %}

<div class="d-flex align-items-center justify-content-around flex-wrap flex-sm-nowrap">
<div class="avatar size-xs">
<p aria-hidden="true">M</p>
<span class="visually-hidden">Mario Rossi</span>
</div>
<div class="avatar avatar-primary size-sm">
<p aria-hidden="true">M</p>
<span class="visually-hidden">Mario Rossi</span>
Expand Down Expand Up @@ -133,28 +126,24 @@ Per utilizzare un'icona all'interno degli Avatar è sufficiente includere il cod
{% capture example %}

<div class="d-flex align-items-center justify-content-around flex-wrap flex-sm-nowrap">
<div class="avatar size-xs">
<svg class="icon icon-primary"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
<div class="avatar size-sm">
<svg class="icon icon-secondary"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
<div class="avatar">
<svg class="icon icon-success"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
<div class="avatar size-lg">
<svg class="icon icon-warning"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
<div class="avatar size-xl">
<svg class="icon icon-danger"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
<div class="avatar size-xxl">
<svg class="icon icon-primary"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</div>
</div>
Expand All @@ -176,7 +165,7 @@ Per associare un Avatar ad un'azione o un link, utilizzare il tag `<a>` con rela
<span class="visually-hidden">Mario Rossi</span>
</a>
<a class="avatar size-xl" href="#">
<svg class="icon icon-secondary"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-search"></use></svg>
<svg class="icon icon-secondary"><use href="{{ site.baseurl }}/dist/svg/sprites.svg#it-user"></use></svg>
<span class="visually-hidden">Cerca</span>
</a>
</div>
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/scss/base/_maps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,12 @@ $utilities-border-colors: map-loop($utilities-border, rgba-css-var, '$key', 'bor
$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;

$gutters: $spacers !default;

// Global status colors
$status: (
'primary': $color-primary,
'info': $color-status-info,
'success': $color-status-success,
'warning': $color-status-warning,
'danger': $color-status-danger,
) !default;
2 changes: 1 addition & 1 deletion src/scss/base/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Skins
@import 'mixins/border-radius';
@import 'mixins/box-shadow';
@import 'mixins/gradients';
@import 'mixins/gradients'; // Disabled as not used in the project
@import 'mixins/transition';

// Layout
Expand Down
2 changes: 1 addition & 1 deletion src/scss/base/_reboot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
// scss-docs-start reboot-body-rules
body {
margin: 0; // 1
font-family: var(--#{$prefix}body-font-family);
font-family: var(--#{$prefix}font-sans);
@include font-size(var(--#{$prefix}body-font-size));
font-weight: var(--#{$prefix}body-font-weight);
line-height: var(--#{$prefix}body-line-height);
Expand Down
Loading
Loading