clone of olivero for island lives
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
3.5 KiB

10 months ago
/*
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/3084859
* @preserve
*/
/**
* @file
* Button that expands second level nav when clicked.
*/
.primary-nav__button-toggle {
position: relative;
overflow: hidden;
width: var(--sp2);
height: var(--sp2);
margin-block-start: var(--sp0-5); /* Visually align button with menu link text. */
padding-block: 0;
padding-inline-start: 0;
padding-inline-end: 0;
cursor: pointer;
text-indent: -62.4375rem;
border: 0;
background: transparent;
-webkit-appearance: none;
}
.primary-nav__button-toggle:focus {
outline: auto 2px var(--color--primary-50);
outline-offset: 2px;
}
.primary-nav__button-toggle .icon--menu-toggle {
position: absolute;
/* stylelint-disable csstools/use-logical */
top: 50%;
left: 50%;
/* stylelint-enable csstools/use-logical */
width: 1rem;
height: 1rem;
transition: background-color 0.2s;
transform: translate(-50%, -50%);
border-radius: 2px;
}
.primary-nav__button-toggle .icon--menu-toggle::before,
.primary-nav__button-toggle .icon--menu-toggle::after {
position: absolute;
/* stylelint-disable csstools/use-logical */
top: 50%;
left: 50%;
/* stylelint-enable csstools/use-logical */
width: var(--sp);
height: 0;
content: "";
transform: translate(-50%, -50%);
/* Intentionally not using CSS logical properties. */
border-top: solid 3px var(--color--primary-50);
}
.primary-nav__button-toggle .icon--menu-toggle::after {
transition: opacity 0.2s;
transform: translate(-50%, -50%) rotate(90deg);
}
.primary-nav__button-toggle[aria-expanded="true"] .icon--menu-toggle::after {
opacity: 0;
}
/* aria-hidden attribute is removed by JS. Button is non-functional
until JS is enabled.
*/
.primary-nav__button-toggle[aria-hidden="true"] {
pointer-events: none;
}
@media (min-width: 75rem) {
body:not(.is-always-mobile-nav) .primary-nav__button-toggle {
flex-shrink: 0;
align-self: stretch;
width: calc(var(--sp2) + 0.5rem);
height: auto;
margin-block-start: 0;
margin-inline-end: calc(-1 * var(--sp2));
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle:focus {
border: 0;
outline: 0;
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle:focus .icon--menu-toggle {
border: solid 2px var(--color--primary-40);
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle:active {
/* Necessary for Safari. */
color: currentColor;
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle[aria-expanded="true"] .icon--menu-toggle::after {
opacity: 0.8;
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle {
inset-inline-start: 0.1875rem;
width: 1.125rem;
transform: translateY(-50%);
border-radius: 0.25rem;
background-color: var(--color--white);
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle::before {
content: none;
}
body:not(.is-always-mobile-nav) .primary-nav__button-toggle .icon--menu-toggle::after {
/* stylelint-disable csstools/use-logical */
top: calc(50% - 2px);
left: 0.1875rem;
/* stylelint-enable csstools/use-logical */
width: 0.5rem;
height: 0.5rem;
content: "";
transform: translateY(-50%) rotate(45deg);
opacity: 0.8;
/* Intentionally not using CSS logical properties. */
border-top: none;
border-right: solid 2px currentColor;
border-bottom: solid 2px currentColor;
background: transparent;
}
}