123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561 |
- @use 'sass:map';
- @use './variables';
- @use '../tools/functions' as *;
- $utilities: () !default;
- @if ($utilities != false) {
- $utilities: map-deep-merge(
- (
- // Display utilities
- "overflow": (
- property: overflow,
- values: auto hidden visible,
- ),
- "overflow-x": (
- property: overflow-x,
- values: auto hidden
- ),
- "overflow-y": (
- property: overflow-y,
- values: auto hidden
- ),
- "display": (
- responsive: true,
- print: true,
- property: display,
- class: d,
- values: none inline inline-block block table table-row table-cell flex inline-flex
- ),
- "float": (
- responsive: true,
- print: true,
- property: float,
- class: float,
- values: none left right
- ),
- "float:rtl": (
- responsive: true,
- print: true,
- property: float,
- class: float,
- values: (
- end: left,
- start: right,
- )
- ),
- "float:ltr": (
- responsive: true,
- print: true,
- property: float,
- class: float,
- values: (
- end: right,
- start: left,
- )
- ),
- // Flex utilities
- "flex": (
- responsive: true,
- property: flex,
- values: (
- fill: 1 1 auto,
- '1-1': 1 1 auto,
- '1-0': 1 0 auto,
- '0-1': 0 1 auto,
- '0-0': 0 0 auto,
- '1-1-100': 1 1 100%,
- '1-0-100': 1 0 100%,
- '0-1-100': 0 1 100%,
- '0-0-100': 0 0 100%
- )
- ),
- "flex-direction": (
- responsive: true,
- property: flex-direction,
- class: flex,
- values: row column row-reverse column-reverse
- ),
- "flex-grow": (
- responsive: true,
- property: flex-grow,
- class: flex,
- values: (
- grow-0: 0,
- grow-1: 1,
- )
- ),
- "flex-shrink": (
- responsive: true,
- property: flex-shrink,
- class: flex,
- values: (
- shrink-0: 0,
- shrink-1: 1,
- )
- ),
- "flex-wrap": (
- responsive: true,
- property: flex-wrap,
- class: flex,
- values: wrap nowrap wrap-reverse
- ),
- "justify-content": (
- responsive: true,
- property: justify-content,
- class: justify,
- values: (
- start: flex-start,
- end: flex-end,
- center: center,
- space-between: space-between,
- space-around: space-around,
- space-evenly: space-evenly,
- )
- ),
- "align-items": (
- responsive: true,
- property: align-items,
- class: align,
- values: (
- start: flex-start,
- end: flex-end,
- center: center,
- baseline: baseline,
- stretch: stretch,
- )
- ),
- "align-content": (
- responsive: true,
- property: align-content,
- values: (
- start: flex-start,
- end: flex-end,
- center: center,
- space-between: space-between,
- space-around: space-around,
- space-evenly: space-evenly,
- stretch: stretch,
- )
- ),
- "align-self": (
- responsive: true,
- property: align-self,
- values: (
- auto: auto,
- start: flex-start,
- end: flex-end,
- center: center,
- baseline: baseline,
- stretch: stretch,
- )
- ),
- "order": (
- responsive: true,
- property: order,
- values: (
- first: -1,
- 0: 0,
- 1: 1,
- 2: 2,
- 3: 3,
- 4: 4,
- 5: 5,
- 6: 6,
- 7: 7,
- 8: 8,
- 9: 9,
- 10: 10,
- 11: 11,
- 12: 12,
- last: 13,
- ),
- ),
- // Margin utilities
- "margin": (
- responsive: true,
- property: margin,
- class: ma,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-x": (
- responsive: true,
- property: margin-right margin-left,
- class: mx,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-y": (
- responsive: true,
- property: margin-top margin-bottom,
- class: my,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-top": (
- responsive: true,
- property: margin-top,
- class: mt,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-right": (
- responsive: true,
- property: margin-right,
- class: mr,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-bottom": (
- responsive: true,
- property: margin-bottom,
- class: mb,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-left": (
- responsive: true,
- property: margin-left,
- class: ml,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-start": (
- responsive: true,
- property: margin-inline-start,
- class: ms,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- "margin-end": (
- responsive: true,
- property: margin-inline-end,
- class: me,
- values: map.merge(variables.$spacers, (auto: auto))
- ),
- // Negative margin utilities
- "negative-margin": (
- responsive: true,
- property: margin,
- class: ma,
- values: variables.$negative-spacers
- ),
- "negative-margin-x": (
- responsive: true,
- property: margin-right margin-left,
- class: mx,
- values: variables.$negative-spacers
- ),
- "negative-margin-y": (
- responsive: true,
- property: margin-top margin-bottom,
- class: my,
- values: variables.$negative-spacers
- ),
- "negative-margin-top": (
- responsive: true,
- property: margin-top,
- class: mt,
- values: variables.$negative-spacers
- ),
- "negative-margin-right": (
- responsive: true,
- property: margin-right,
- class: mr,
- values: variables.$negative-spacers
- ),
- "negative-margin-bottom": (
- responsive: true,
- property: margin-bottom,
- class: mb,
- values: variables.$negative-spacers
- ),
- "negative-margin-left": (
- responsive: true,
- property: margin-left,
- class: ml,
- values: variables.$negative-spacers
- ),
- "negative-margin-start": (
- responsive: true,
- property: margin-inline-start,
- class: ms,
- values: variables.$negative-spacers
- ),
- "negative-margin-end": (
- responsive: true,
- property: margin-inline-end,
- class: me,
- values: variables.$negative-spacers
- ),
- // Padding utilities
- "padding": (
- responsive: true,
- property: padding,
- class: pa,
- values: variables.$spacers
- ),
- "padding-x": (
- responsive: true,
- property: padding-right padding-left,
- class: px,
- values: variables.$spacers
- ),
- "padding-y": (
- responsive: true,
- property: padding-top padding-bottom,
- class: py,
- values: variables.$spacers
- ),
- "padding-top": (
- responsive: true,
- property: padding-top,
- class: pt,
- values: variables.$spacers
- ),
- "padding-right": (
- responsive: true,
- property: padding-right,
- class: pr,
- values: variables.$spacers
- ),
- "padding-bottom": (
- responsive: true,
- property: padding-bottom,
- class: pb,
- values: variables.$spacers
- ),
- "padding-left": (
- responsive: true,
- property: padding-left,
- class: pl,
- values: variables.$spacers
- ),
- "padding-start": (
- responsive: true,
- property: padding-inline-start,
- class: ps,
- values: variables.$spacers
- ),
- "padding-end": (
- responsive: true,
- property: padding-inline-end,
- class: pe,
- values: variables.$spacers
- ),
- // Border radius
- "rounded": (
- property: border-radius,
- class: rounded,
- values: variables.$rounded
- ),
- "rounded-top": (
- property: border-top-left-radius border-top-right-radius,
- class: rounded-t,
- values: variables.$rounded
- ),
- "rounded-end": (
- property: (ltr: border-top-right-radius border-bottom-right-radius, rtl: border-top-left-radius border-bottom-left-radius),
- class: rounded-e,
- values: variables.$rounded
- ),
- "rounded-bottom": (
- property: border-bottom-left-radius border-bottom-right-radius,
- class: rounded-b,
- values: variables.$rounded
- ),
- "rounded-start": (
- property: (ltr: border-top-left-radius border-bottom-left-radius, rtl: border-top-right-radius border-bottom-right-radius),
- class: rounded-s,
- values: variables.$rounded
- ),
- "rounded-top-start": (
- property: (ltr: border-top-left-radius, rtl: border-top-right-radius),
- class: rounded-ts,
- values: variables.$rounded
- ),
- "rounded-top-end": (
- property: (ltr: border-top-right-radius, rtl: border-top-left-radius),
- class: rounded-te,
- values: variables.$rounded
- ),
- "rounded-bottom-end": (
- property: (ltr: border-bottom-right-radius, rtl: border-bottom-left-radius),
- class: rounded-be,
- values: variables.$rounded
- ),
- "rounded-bottom-start": (
- property: (ltr: border-bottom-left-radius, rtl: border-bottom-right-radius),
- class: rounded-bs,
- values: variables.$rounded
- ),
- // Border
- "border": (
- property: border-width border-style border-color,
- class: border,
- values: variables.$borders
- ),
- "border-opacity": (
- property: --v-border-opacity,
- class: border-opacity,
- values: variables.$border-opacities
- ),
- "border-top": (
- property: border-block-start-width border-block-start-style border-block-start-color,
- class: border-t,
- values: variables.$borders
- ),
- "border-end": (
- property: border-inline-end-width border-inline-end-style border-inline-end-color,
- class: border-e,
- values: variables.$borders
- ),
- "border-bottom": (
- property: border-block-end-width border-block-end-style border-block-end-color,
- class: border-b,
- values: variables.$borders
- ),
- "border-start": (
- property: border-inline-start-width border-inline-start-style border-inline-start-color,
- class: border-s,
- values: variables.$borders
- ),
- "border-style": (
- property: border-style,
- class: border,
- values: solid dashed dotted double none
- ),
- // Text
- "text-align": (
- responsive: true,
- property: text-align,
- class: text,
- values: left right center justify start end
- ),
- "text-decoration": (
- property: text-decoration,
- class: text-decoration,
- values: line-through none overline underline
- ),
- "white-space": (
- property: white-space,
- class: text,
- values: (
- wrap: normal,
- no-wrap: nowrap,
- pre: pre,
- pre-line: pre-line,
- pre-wrap: pre-wrap,
- )
- ),
- "overflow-wrap": (
- property: overflow-wrap word-break, // word-break for IE & < Edge 18
- class: text,
- values: (break: break-word)
- ),
- "text-opacity": (
- property: color,
- class: text,
- values: (
- high-emphasis: rgba(var(--v-theme-on-background), var(--v-high-emphasis-opacity)),
- medium-emphasis: rgba(var(--v-theme-on-background), var(--v-medium-emphasis-opacity)),
- disabled: rgba(var(--v-theme-on-background), var(--v-disabled-opacity)),
- )
- ),
- "text-overflow": (
- property: white-space overflow text-overflow,
- class: text,
- values: (truncate: nowrap hidden ellipsis)
- ),
- "typography": (
- responsive: true,
- property: (
- font-size,
- font-weight,
- line-height,
- letter-spacing,
- font-family,
- text-transform
- ),
- class: text,
- unimportant: (
- font-weight,
- line-height
- ),
- values: variables.$flat-typography
- ),
- "text-transform": (
- property: text-transform,
- class: text,
- values: none capitalize lowercase uppercase
- ),
- "font-weight": (
- property: font-weight,
- class: font-weight,
- values: variables.$font-weights
- ),
- "font-italic": (
- property: font-style,
- class: font,
- values: italic
- ),
- "text-mono": (
- property: font-family,
- class: text,
- values: (
- mono: monospace
- )
- ),
- // Position
- "position": (
- property: position,
- class: position,
- values: static relative fixed absolute sticky
- ),
- // Sizing
- "fill-height": (
- property: height,
- class: fill,
- values: (
- height: 100%
- )
- ),
- "height": (
- property: height,
- class: h,
- values: (
- auto: auto,
- screen: 100vh,
- 0: 0,
- 25: 25%,
- 50: 50%,
- 75: 75%,
- 100: 100%
- )
- ),
- "height-screen": (
- property: height,
- class: h,
- values: (
- screen: 100dvh
- )
- ),
- "width": (
- property: width,
- class: w,
- values: (
- auto: auto,
- 0: 0,
- 25: 25%,
- 33: 33%,
- 50: 50%,
- 66: 66%,
- 75: 75%,
- 100: 100%
- )
- )
- ),
- $utilities
- );
- } @else {
- $utilities: ();
- }
|