Skip to content

Commit

Permalink
feat: add indent4XS (#864)
Browse files Browse the repository at this point in the history
* feat: add indent4XS

* feat: fix in storybook
  • Loading branch information
NikitaCG authored Mar 21, 2024
1 parent 669925e commit 9dd5136
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .storybook/stories/documentation/Indents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Meta } from '@storybook/blocks';

# Project dimensional grid:

`4XS` - 4px

`XXXS` - 8px

`XXS` - 12px
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Form/Form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $largeBorderRadius: 32px;
margin: 0 0 $indentSM $textPadding;

&_mobile {
margin-left: 4px;
margin-left: $indent4XS;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Author/Author.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $authorBorderRadius: $indentXS;
@include text-size(body-2);

color: $secondary;
padding-top: 4px;
padding-top: $indent4XS;
}

&__label:not(:first-child) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Media/DataLens/DataLens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $block: '.#{$ns}media-component-data-lens';
}

&__iframe {
width: calc(100% + 4px);
height: calc(100% + 4px);
width: calc(100% + $indent4XS);
height: calc(100% + $indent4XS);
margin: -1px -2px 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Title/TitleItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $block: '.#{$ns}title-item';
}

&_size_s {
margin-top: 4px;
margin-top: $indent4XS;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/editor/components/EditBlock/EditBlock.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $block: '.#{$ns}edit-block';
background-color: var(--pc-editor-control-color);

&:not(:first-child) {
margin-left: 4px;
margin-left: $indent4XS;
}
}
}
6 changes: 3 additions & 3 deletions src/editor/containers/Form/dynamic-form-custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@
}

.df-use-search {
margin: 4px 0;
margin: $indent4XS 0;
}

.df-simple-vertical-accordeon__body,
.df-group-indent > .df-use-search {
margin-top: 0;
margin-left: 1px;
padding-top: 4px;
padding-bottom: 4px;
padding-top: $indent4XS;
padding-bottom: $indent4XS;
padding-left: $indentXXS;
border-left: 1px solid var(--g-color-line-generic-accent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $block: '.#{$ns}one-of-custom';
& > .#{$df-ns}use-search {
padding-top: 11px;
padding-left: $indentXXS;
margin-top: 4px;
margin-top: $indent4XS;
margin-bottom: $normalOffset;
margin-left: 5px;
border-left: 1px solid var(--g-color-line-generic-accent);
Expand Down
2 changes: 1 addition & 1 deletion src/sub-blocks/HubspotForm/HubspotForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ $block: '.#{$ns}hubspot-form';
.hs-form-field,
.hs_error_rollup.actions,
.submitted-message {
padding: 0 4px;
padding: 0 $indent4XS;
}

.hs-form-field {
Expand Down
2 changes: 1 addition & 1 deletion src/sub-blocks/ImageCard/ImageCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $block: '.#{$ns}image-card';

&_margins {
&_s {
padding: 4px;
padding: $indent4XS;

#{$image}_inner {
border-radius: calc(#{$borderRadius} - #{$imagePadding});
Expand Down
2 changes: 1 addition & 1 deletion src/sub-blocks/PriceCard/PriceCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $block: '.#{$ns}price-card';
}

&-period {
margin-left: 4px;
margin-left: $indent4XS;
}

&-details {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $block: '.#{$ns}price-description';
}

&__detailed-title {
margin-left: 4px;
margin-left: $indent4XS;
}

&__label {
Expand Down
2 changes: 1 addition & 1 deletion styles/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@

$label-height: 16px;

padding: 0 4px;
padding: 0 $indent4XS;
height: $label-height;
line-height: $label-height;
}
Expand Down
1 change: 1 addition & 0 deletions styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ $borderRadius: var(--pc-border-radius);
$imagePadding: var(--pc-image-padding);

//indents
$indent4XS: 4px;
$indentXXXS: 8px;
$indentXXS: 12px;
$indentXS: 16px;
Expand Down

0 comments on commit 9dd5136

Please sign in to comment.