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

Add position utilities class #23095

Closed
wants to merge 13 commits into from
5 changes: 5 additions & 0 deletions scss/utilities/_position.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@
z-index: $zindex-sticky;
}
}

.pos-s { position: static; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing position: sticky, which, with this naming scheme, would be problematic. We'll need that utility and a different name.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right!
Could be a good naming scheme ?
pos-sti
pos-sta
pos-rel
pos-abs
pos-fix

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At that point, we might as well use the full value names. .p-sticky, .p-static, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!
Thank you, I will a commit with this edit 🙂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not keep pos- or po- as prefix as p is use for padding ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there's no risk of overlap with padding—these values are unique to positioning.

.pos-r { position: relative; }
.pos-a { position: absolute; }
.pos-f { position: fixed; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files should end with a trailing newline