Skip to content

Commit

Permalink
fix: update base spacing variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford committed Jan 10, 2024
1 parent 4f3dd42 commit bdb8f38
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions assets/newspack-ui/scss/elements/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
border: 0;
font-size: var( --newspack-ui-font-size-small ); // Prevent relative font size
line-height: var( --newspack-ui-line-height-large );
margin: calc( var( --newspack-ui-spacer-1 ) / -2 ) 0; // Offset cell padding.
margin: calc( var( --newspack-ui-spacer-base ) / -2 ) 0; // Offset cell padding.
th,
td {
background: transparent;
border-color: var( --newspack-ui-color-border );
border-width: 0 0 1px;
font-size: var( --newspack-ui-font-size-small ); // Prevent relative font size
padding: calc( var( --newspack-ui-spacer-1 ) / 2 ) 0;
padding: calc( var( --newspack-ui-spacer-base ) / 2 ) 0;
vertical-align: top;
> * {
white-space: nowrap;
Expand Down
2 changes: 1 addition & 1 deletion assets/newspack-ui/scss/elements/forms/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
gap: var( --newspack-ui-spacer-2 );
justify-content: center;
line-height: var( --newspack-ui-line-height-large );
margin-bottom: var( --newspack-ui-spacer-1 );
margin-bottom: var( --newspack-ui-spacer-base );
padding: var( --newspack-ui-spacer-2 ) var( --newspack-ui-spacer-3 ); // TODO: correct this
transition: background-color 150ms ease-in-out;

Expand Down
4 changes: 2 additions & 2 deletions assets/newspack-ui/scss/elements/forms/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
// Container for displaying grid of inputs.
& &__code-input {
display: flex;
gap: var( --newspack-ui-spacer-1 );
gap: var( --newspack-ui-spacer-base );
}

// Container for input description.
&__field-description {
display: block;
font-size: var( --newspack-ui-font-size-small );
line-height: var( --newspack-ui-line-height-small );
margin: var( --newspack-ui-spacer-1 ) 0 var( --newspack-ui-spacer-5 );
margin: var( --newspack-ui-spacer-base ) 0 var( --newspack-ui-spacer-5 );
}
}
18 changes: 9 additions & 9 deletions assets/newspack-ui/scss/variables/_spacing.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:root {
// Spacing - not ems because the font size of the element itself caused a cascade
--newspack-ui-spacer-1: 8px;
--newspack-ui-spacer-2: calc( var( --newspack-ui-spacer-1 ) * 1.5 ); // 12px
--newspack-ui-spacer-3: calc( var( --newspack-ui-spacer-1 ) * 2 ); // 16px
--newspack-ui-spacer-4: calc( var( --newspack-ui-spacer-1 ) * 2.5 ); // 20px
--newspack-ui-spacer-5: calc( var( --newspack-ui-spacer-1 ) * 3 ); // 24px
--newspack-ui-spacer-6: calc( var( --newspack-ui-spacer-1 ) * 4 ); // 32px - TODO: clamp?
--newspack-ui-spacer-7: calc( var( --newspack-ui-spacer-1 ) * 5 ); // 40px - TODO: clamp?
--newspack-ui-spacer-8: calc( var( --newspack-ui-spacer-1 ) * 6 ); // 48px - TODO: clamp?
--newspack-ui-spacer-9: calc( var( --newspack-ui-spacer-1 ) * 8 ); // 64px - TODO: clamp?
--newspack-ui-spacer-base: 8px;
--newspack-ui-spacer-2: calc( var( --newspack-ui-spacer-base ) * 1.5 ); // 12px
--newspack-ui-spacer-3: calc( var( --newspack-ui-spacer-base ) * 2 ); // 16px
--newspack-ui-spacer-4: calc( var( --newspack-ui-spacer-base ) * 2.5 ); // 20px
--newspack-ui-spacer-5: calc( var( --newspack-ui-spacer-base ) * 3 ); // 24px
--newspack-ui-spacer-6: calc( var( --newspack-ui-spacer-base ) * 4 ); // 32px - TODO: clamp?
--newspack-ui-spacer-7: calc( var( --newspack-ui-spacer-base ) * 5 ); // 40px - TODO: clamp?
--newspack-ui-spacer-8: calc( var( --newspack-ui-spacer-base ) * 6 ); // 48px - TODO: clamp?
--newspack-ui-spacer-9: calc( var( --newspack-ui-spacer-base ) * 8 ); // 64px - TODO: clamp?
}

0 comments on commit bdb8f38

Please sign in to comment.