Skip to content

Admin Bar: Add custom property for responsive height value#1234

Closed
ryelle wants to merge 3 commits intoWordPress:masterfrom
ryelle:ticket-52623-ab-custom-prop
Closed

Admin Bar: Add custom property for responsive height value#1234
ryelle wants to merge 3 commits intoWordPress:masterfrom
ryelle:ticket-52623-ab-custom-prop

Conversation

@ryelle
Copy link
Contributor

@ryelle ryelle commented May 6, 2021

Sets up a new custom property --wp-admin--admin-bar--height, and uses it in all the places where the height (value) is used.

If we don't want to change all the CSS in admin-bar.css, we could also just use 7ab4b04 & 716d654 - add the custom property and use it in the default frontend code.

Themes can use this in their CSS to offset content, and it will inherit the correct size. For example:

.some-banner {
    top: var(--wp-admin--admin-bar--height);
}

It would be nice to set this to 0 when there is no admin bar, but the property needs to be on html and the admin-bar class is on body.

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


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@ryelle ryelle closed this Nov 22, 2021
@ryelle ryelle deleted the ticket-52623-ab-custom-prop branch November 22, 2021 15:20
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 10, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fix typo.
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
Fixes WordPress#1234, #947583, #84757.
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
desrosj added a commit to desrosj/wordpress-develop that referenced this pull request Jan 11, 2022
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.

1 participant