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

Inline and block Physical to Logical properties #47

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions scss/components/_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#{$parent-selector} details {
display: block;
margin-bottom: var(#{$css-var-prefix}spacing);
margin-block-end: var(#{$css-var-prefix}spacing);

summary {
line-height: 1rem;
Expand Down Expand Up @@ -88,7 +88,7 @@
// Open
&[open] {
> summary {
margin-bottom: var(#{$css-var-prefix}spacing);
margin-block-end: var(#{$css-var-prefix}spacing);

&:not([role]) {
&:not(:focus) {
Expand Down
28 changes: 14 additions & 14 deletions scss/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#{$parent-selector} [role="article"]:not(:has(> form:first-child)),
#{$parent-selector} article > form,
#{$parent-selector} [role="article"] > form {
margin-bottom: var(#{$css-var-prefix}block-spacing-vertical);
margin-block-end: var(#{$css-var-prefix}block-spacing-vertical);
padding: var(#{$css-var-prefix}block-spacing-vertical)
var(#{$css-var-prefix}block-spacing-horizontal);
border-radius: var(#{$css-var-prefix}border-radius);
Expand All @@ -19,17 +19,17 @@

> header,
> footer {
margin-right: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
margin-left: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
margin-inline-end: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
margin-inline-start: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
padding: calc(var(#{$css-var-prefix}block-spacing-vertical) * 0.66)
var(#{$css-var-prefix}block-spacing-horizontal);
background-color: var(#{$css-var-prefix}card-sectioning-background-color);
}

> header {
margin-top: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
margin-bottom: var(#{$css-var-prefix}block-spacing-vertical);
border-bottom: var(#{$css-var-prefix}border-width)
margin-block-start: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
margin-block-end: var(#{$css-var-prefix}block-spacing-vertical);
border-block-end: var(#{$css-var-prefix}border-width)
solid
var(#{$css-var-prefix}card-border-color);
border-top-right-radius: var(#{$css-var-prefix}border-radius);
Expand All @@ -41,7 +41,7 @@
> h4,
> h5,
> h6 {
margin-bottom: 0;
margin-block-end: 0;
}

> hgroup {
Expand All @@ -51,15 +51,15 @@
> h4,
> h5,
> h6 {
margin-bottom: 0;
margin-block-end: 0;
}
}
}

> footer {
margin-top: var(#{$css-var-prefix}block-spacing-vertical);
margin-bottom: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
border-top: var(#{$css-var-prefix}border-width)
margin-block-start: var(#{$css-var-prefix}block-spacing-vertical);
margin-block-end: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
border-block-start: var(#{$css-var-prefix}border-width)
solid
var(#{$css-var-prefix}card-border-color);
border-bottom-right-radius: var(#{$css-var-prefix}border-radius);
Expand All @@ -74,15 +74,15 @@
nav,
ul,
ol {
margin-bottom: 0px;
margin-block-end: 0px;

&:last-child {
margin-bottom: 0px;
margin-block-end: 0px;
}

/* Also remove if next input after button is a hidden input */
&:has(+ [type="hidden"]) {
margin-bottom: 0px;
margin-block-end: 0px;
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions scss/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// ––––––––––––––––––––
#{$parent-selector} details.dropdown {
position: relative;
border-bottom: none;
border-block-end: none;

@if $enable-transitions {
&[open] {
Expand Down Expand Up @@ -138,7 +138,7 @@
min-width: 200px;
min-width: fit-content;
margin: 0;
margin-top: var(#{$css-var-prefix}outline-width);
margin-block-start: var(#{$css-var-prefix}outline-width);
padding: 0;
border: var(#{$css-var-prefix}border-width)
solid
Expand All @@ -163,22 +163,22 @@

li {
width: 100%;
margin-bottom: 0;
margin-block-end: 0;
padding: calc(var(#{$css-var-prefix}form-element-spacing-vertical) * 0.5)
var(#{$css-var-prefix}form-element-spacing-horizontal);
list-style: none;

&:first-of-type {
margin-top: calc(var(#{$css-var-prefix}form-element-spacing-vertical) * 0.5);
margin-block-start: calc(var(#{$css-var-prefix}form-element-spacing-vertical) * 0.5);
}

&:last-of-type {
margin-bottom: calc(var(#{$css-var-prefix}form-element-spacing-vertical) * 0.5);
margin-block-end: calc(var(#{$css-var-prefix}form-element-spacing-vertical) * 0.5);
}

details {
width: 100%;
margin-bottom: 0;
margin-block-end: 0;
> summary {
line-height: var(#{$css-var-prefix}line-height);
}
Expand Down Expand Up @@ -224,7 +224,7 @@
// Button opened
// inside container type accordion
// ––––––––––––––––––––
margin-bottom: 0;
margin-block-end: 0;

// Close for dropdown
// inside container type accordion
Expand Down Expand Up @@ -263,7 +263,7 @@
display: inline;
margin: calc(var(#{$css-var-prefix}nav-element-spacing-vertical) * -1) 0;
// Override height
margin-bottom: 0;
margin-block-end: 0;

> summary {
&:not([role]) {
Expand Down Expand Up @@ -292,6 +292,6 @@
// Label
// ––––––––––––––––––––
#{$parent-selector} label > details.dropdown {
margin-top: calc(var(#{$css-var-prefix}spacing) * 0.25);
margin-block-start: calc(var(#{$css-var-prefix}spacing) * 0.25);
}
}
22 changes: 11 additions & 11 deletions scss/components/_group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
display: inline-flex;
position: relative;
width: 100%;
margin-bottom: var(#{$css-var-prefix}spacing);
margin-block-end: var(#{$css-var-prefix}spacing);
border-radius: var(#{$css-var-prefix}border-radius);
box-shadow: var(#{$css-var-prefix}group-box-shadow, 0 0 0 rgba(0, 0, 0, 0));
vertical-align: middle;
Expand All @@ -36,10 +36,10 @@
> details {
position: relative;
flex: 1 1 auto;
margin-bottom: 0;
margin-block-end: 0;

&:not(:first-child) {
margin-left: 0;
margin-inline-start: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand All @@ -56,7 +56,7 @@

> details {
&:not(:first-child) > summary {
margin-left: 0;
margin-inline-start: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand All @@ -82,7 +82,7 @@
> legend,
> details > summary {
&:not(:first-child) {
margin-left: calc(var(#{$css-var-prefix}border-width) * -1);
margin-inline-start: calc(var(#{$css-var-prefix}border-width) * -1);
}
}

Expand Down Expand Up @@ -174,8 +174,8 @@
> legend,
> details > summary {
&:not(:first-child) {
margin-right: 0;
margin-left: auto;
margin-inline-end: 0;
margin-inline-start: auto;
border-top-right-radius: 0;
border-top-left-radius: var(#{$css-var-prefix}border-radius);
border-bottom-right-radius: 0;
Expand All @@ -201,8 +201,8 @@
> legend,
> details > summary {
&:not(:first-child) {
margin-right: calc(var(#{$css-var-prefix}border-width) * -1);
margin-left: auto;
margin-inline-end: calc(var(#{$css-var-prefix}border-width) * -1);
margin-inline-start: auto;
}
}
}
Expand Down Expand Up @@ -233,7 +233,7 @@
+ label {
z-index: 10;
// label was positioned above placeholder..
margin-top: 5px;
margin-block-start: 5px;
}
}

Expand All @@ -244,7 +244,7 @@
> label,
> legend,
> details > summary {
margin-left: 0;
margin-inline-start: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand Down
18 changes: 9 additions & 9 deletions scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@

> header {
> * {
margin-bottom: 0;
margin-block-end: 0;
}

#{$close-selector} {
margin: 0;
margin-left: var(#{$css-var-prefix}spacing);
margin-inline-start: var(#{$css-var-prefix}spacing);
padding: 0;
float: right;
}
Expand All @@ -82,10 +82,10 @@

button,
[role="button"] {
margin-bottom: 0;
margin-block-end: 0;

&:not(:first-of-type) {
margin-left: calc(var(#{$css-var-prefix}spacing) * 0.5);
margin-inline-start: calc(var(#{$css-var-prefix}spacing) * 0.5);
}
}
}
Expand All @@ -95,9 +95,9 @@
display: block;
width: 1rem;
height: 1rem;
margin-top: calc(var(#{$css-var-prefix}spacing) * -1);
margin-bottom: var(#{$css-var-prefix}spacing);
margin-left: auto;
margin-block-start: calc(var(#{$css-var-prefix}spacing) * -1);
margin-block-end: var(#{$css-var-prefix}spacing);
margin-inline-start: auto;
border: none;
background-image: var(#{$css-var-prefix}icon-close);
background-position: center;
Expand Down Expand Up @@ -131,7 +131,7 @@
// Utilities
@if $enable-classes {
.modal-is-open {
padding-right: var(#{$css-var-prefix}scrollbar-width, 0px);
padding-inline-end: var(#{$css-var-prefix}scrollbar-width, 0px);
overflow: hidden;
pointer-events: none;
touch-action: none;
Expand Down Expand Up @@ -192,7 +192,7 @@
> footer {
display: flex;
justify-content: flex-end;
margin-top: auto;
margin-block-start: auto;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_nav-hamburger.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
a {
display: block;
margin: 0;
border-bottom: 1px solid transparent;
border-block-end: 1px solid transparent;
border-radius: 0;
transition:
border-color var(#{$css-var-prefix}transition),
Expand Down
12 changes: 6 additions & 6 deletions scss/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
ol,
ul {
align-items: center;
margin-bottom: 0;
margin-block-end: 0;
padding: 0;
list-style: none;

&:first-of-type {
margin-left: calc(var(#{$css-var-prefix}nav-element-spacing-horizontal) * -1);
margin-inline-start: calc(var(#{$css-var-prefix}nav-element-spacing-horizontal) * -1);
}
&:last-of-type {
margin-right: calc(var(#{$css-var-prefix}nav-element-spacing-horizontal) * -1);
margin-inline-end: calc(var(#{$css-var-prefix}nav-element-spacing-horizontal) * -1);
}
}

Expand Down Expand Up @@ -71,9 +71,9 @@
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
select {
height: auto;
margin-right: inherit;
margin-bottom: 0;
margin-left: inherit;
margin-inline-end: inherit;
margin-block-end: 0;
margin-inline-start: inherit;
padding: calc(
var(#{$css-var-prefix}nav-link-spacing-vertical) -
(var(#{$css-var-prefix}border-width) * 2)
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_popover-toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
background: rgba(0, 0, 0, 0.7);
}
button {
margin-top: -10px;
margin-block-start: -10px;
padding: 0;
border: 0 none;
background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
background: rgba(0, 0, 0, 0.7);
}
button {
margin-top: -10px;
margin-block-start: -10px;
padding: 0;
border: 0 none;
background: transparent;
Expand Down
2 changes: 1 addition & 1 deletion scss/components/_progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
appearance: none;
width: 100%;
height: 0.5rem;
margin-bottom: calc(var(#{$css-var-prefix}spacing) * 0.5);
margin-block-end: calc(var(#{$css-var-prefix}spacing) * 0.5);
overflow: hidden;

// Remove Firefox and Opera border
Expand Down
Loading