@use 'theme'; @use 'upsell'; $toolbar-block-size: 136px; $wpcontent-inline-start-indent: 20px; #wpbody { padding-block-start: $toolbar-block-size; } .code-snippets-toolbar { color: #2c3337; background: #fff; font-family: 'SF Pro', sans-serif; margin-inline-start: -$wpcontent-inline-start-indent - 2; position: absolute; inline-size: calc(100% + $wpcontent-inline-start-indent); block-size: $toolbar-block-size; inset-block-start: 0; display: flex; flex-direction: column; ul, li { margin: 0; padding: 0; list-style: none; } } .code-snippets-toolbar-upper { justify-content: space-between; block-size: 76px; box-sizing: border-box; padding-block: 16px; padding-inline: 24px; border-block-end: 1px solid rgb(195 196 199 / 50%); display: flex; align-items: center; .logo { display: flex; align-items: center; gap: 8px; img { block-size: 42px; } div { font-size: 18px; font-weight: 700; } } h1 { font-size: 18px; font-weight: 700; line-height: 1.5; } ul { display: flex; gap: 22px; align-items: center; } a { color: inherit; text-decoration: none; } } .code-snippets-toolbar-lower { border-block-end: 1px solid #e2e2e4; block-size: 60px; box-sizing: border-box; nav, ul { block-size: 100%; } ul { display: flex; align-items: stretch; } li { display: flex; } // Items fill the 60px band; the active tab is indicated by accent colour on // its icon and label, with no underline. li a { display: flex; margin: 0; block-size: 100%; padding-block: 0; padding-inline: 24px; color: #2c3337; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; letter-spacing: -0.16px; text-decoration: none; box-sizing: border-box; cursor: pointer; svg { inline-size: 26px; block-size: 26px; } &.active-link, &:hover, &:focus, &:active { color: theme.$accent; } } li:not(.toolbar-end-item) + li.toolbar-end-item { margin-inline-start: auto; } // Narrow widths: centre each item's label directly beneath its icon and // shrink the type so the nav still fits on one row. The pro chip becomes a // small badge pinned to the item's top corner, out of the flow so it never // shifts the icon off-centre from its label. Below 782px the row scrolls // sideways (see the mobile block below) rather than wrapping. @media (width <= 1140px) { li a { position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding-inline: 14px; font-size: 13px; text-align: center; .pro-chip { position: absolute; inset-block-start: 7px; inset-inline-end: 4px; padding-block: 1px; padding-inline: 5px; font-size: 8px; line-height: normal; } } } // Mobile: the primary navigation scrolls horizontally on its band rather // than wrapping, with the scrollbar chrome hidden. @media (width <= 782px) { overflow-x: auto; scrollbar-width: none; &::-webkit-scrollbar { display: none; } ul { flex-wrap: nowrap; } li a { white-space: nowrap; } } } .code-snippets-toolbar-upper li a.active-link, .code-snippets-toolbar-upper li a:hover, .code-snippets-toolbar-upper li a:focus, .code-snippets-toolbar-upper li a:active { color: theme.$accent; } .code-snippets-toolbar-lower .pro-chip, .nav-tab .pro-chip, .snippet-type-link .pro-chip { color: theme.$accent; background: #eff5f9; border: 1px solid rgb(34 113 177 / 10%); text-transform: uppercase; border-radius: 999px; display: flex; justify-content: center; align-items: center; box-sizing: border-box; padding: 5px 12px; font-weight: 700; line-height: 1; } .code-snippets-toolbar-lower .pro-chip { font-size: 12px; } .nav-tab .pro-chip, .snippet-type-link .pro-chip { font-size: 10px; } .code-snippets-return-link { float: inline-end; }