Skip to content

Commit

Permalink
fix(property): remove unnecessary imports, use property() instead o…
Browse files Browse the repository at this point in the history
…f `set()` and set description.
  • Loading branch information
sciborrudnicki committed Aug 26, 2023
1 parent 96bcb0a commit 213d174
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
21 changes: 9 additions & 12 deletions property/_property.variant.mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
@use 'property.variables' as variables;

// Functions.
@use 'property.set.mixin' as property;
@use 'property.mixin' as property;

// Modules.
@use '../class';
@use '../meta';
@use '../selector';
@use '../values';

// Status: DONE
// Property `property.variant()` mixin sets property variant.
// @param `$variant` Variant of map type to set.
// @param `$important` Indicates property is important.
// @param `$pseudo-class`
// @param `$dictionary`
// @param `$class-function`
// @param `$functions`
// @param `$execute`
// @param `$pseudo-class` Pseudo class for `$variant`.
// @param `$dictionary` Dictionary to translate class `$variant`.
// @param `$class-function` Function to set class selector.
// @param `$functions` Functions to use to call on property values.
// @param `$execute` Execute `property.property()` function.
@mixin variant(
$variant: (),
$important: null,
Expand All @@ -40,7 +38,7 @@
@include class.variant($variant, $pseudo-class, $dictionary, $class-function, map) using($resolved) {
@if type-of(map.get($resolved, value)) == map {
@each $attribute, $value in map.get($resolved, value) {
@include property.set(
@include property.property(
(list.join(map.get($resolved, property), map.get($resolved, attribute) $attribute or ()): $value),
$important,
$prefix,
Expand All @@ -51,9 +49,8 @@
);
}
} @else {
@include property.set(
(list.join(map.get($resolved, property), map.get($resolved, attribute) or ()):
map.get($resolved, value)),
@include property.property(
(list.join(map.get($resolved, property), map.get($resolved, attribute) or ()): map.get($resolved, value)),
$important,
$prefix,
$separator,
Expand Down
33 changes: 33 additions & 0 deletions property/_property.variant.mixin.spec.scss
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,36 @@ property.$type-function: map.merge(property.$type-function, (list: --var-get));
// .p-bottom-3:hover {
// padding-bottom: var(--s-unit-3);
// }

// Variant.
// @include variant((
// border: (
// (top-left, bottom-right): (
// radius: (radius: 5%),
// )
// ),
// scroll: (
// ((margin, padding): block): (
// start 5: (start: 5%),
// end 10: (end: 10%),
// )
// )
// ));
// .border-top-left-radius {
// border-top-left-radius: 5%;
// }
// .border-bottom-right-radius {
// border-bottom-right-radius: 5%;
// }
// .scroll-margin-block-start-5 {
// scroll-margin-block-start: 5%;
// }
// .scroll-margin-block-end-10 {
// scroll-margin-block-end: 10%;
// }
// .scroll-padding-block-start-5 {
// scroll-padding-block-start: 5%;
// }
// .scroll-padding-block-end-10 {
// scroll-padding-block-end: 10%;
// }

0 comments on commit 213d174

Please sign in to comment.