BlackbirdDigital / wp-theme-scaffold

Blackbird's WordPress Theme Scaffold
GNU General Public License v2.0
30 stars 1 forks source link

Use core CSS var for admin bar height #50

Closed cr0ybot closed 2 years ago

cr0ybot commented 2 years ago

Instead of manually setting the admin bar height value, we should use --wp-admin--admin-bar--height with a fallback to 0px.

:root {
    // When admin bar is not shown, default to 0px.
    --global--admin-bar--height: var(--wp-admin--admin-bar--height, 0px);
}