Skip to content

Add variable for admin-bar height#1038

Closed
nextgenthemes wants to merge 1 commit intoWordPress:masterfrom
nextgenthemes:patch-2
Closed

Add variable for admin-bar height#1038
nextgenthemes wants to merge 1 commit intoWordPress:masterfrom
nextgenthemes:patch-2

Conversation

@nextgenthemes
Copy link

This adds a variable for the admin-bar height as seen in the 2021 theme but in core for all plugins and themes to utilize.

Trac ticket: https://core.trac.wordpress.org/ticket/52623#ticket

For themes and plugins to use.
@johnbillion johnbillion requested a review from ryelle February 28, 2021 10:03
Copy link
Contributor

@ryelle ryelle left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

I think you could also start to use that variable in this CSS - instead of setting the height twice. (I'm leaving another comment on the ticket about fallbacks)

@@ -1,3 +1,7 @@
.admin-bar {
--wp-admin-bar-height: 32px;
Copy link
Contributor

Choose a reason for hiding this comment

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

We've had some discussions on variable naming, and I think have landed on a pattern like --wp-admin--[location]--[property]. Using that format, this property should be:

Suggested change
--wp-admin-bar-height: 32px;
--wp-admin--admin-bar--height: 32px;

@hellofromtonya
Copy link
Contributor

Closing as the ticket is closed and an alternative solution committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants