Files
CustomBranding/examples/custom-branding-communicationsite.css

222 lines
4.5 KiB
CSS

/*
* Custom Branding und Mega Menu sind direkte Geschwister in #CustomHeader:
*
* #CustomHeader
* .system-ndzk-bar
* .portal-branding | #CustomNavigation
*/
#CustomHeader {
align-items: stretch;
background: #ffffff;
box-sizing: border-box;
display: grid;
font-family: "Segoe UI", "Segoe UI Web (West European)", sans-serif;
grid-template-areas:
"system system"
"branding navigation";
grid-template-columns: 240px minmax(0, 1fr);
grid-template-rows: 28px 309px;
gap: 0;
height: 250px;
width: 100%;
}
#CustomHeader > .system-ndzk-bar {
align-items: center;
background: #c50f1f;
box-sizing: border-box;
color: #ffffff;
display: flex;
font-size: 14px;
font-weight: 600;
grid-area: system;
grid-column: 1 / -1;
grid-row: 1;
line-height: 20px;
padding: 4px 16px;
}
#CustomHeader > .portal-branding {
grid-area: branding;
grid-column: 1;
grid-row: 2;
min-width: 0;
}
#CustomHeader > #CustomNavigation {
align-items: stretch;
align-self: start;
border-bottom: 0 !important;
border-top: 0 !important;
display: flex;
grid-area: navigation;
grid-column: 2;
grid-row: 2;
height: 40px;
min-width: 0;
position: relative;
--megaMenuBarHeight: 40px;
}
#CustomHeader > #CustomNavigation > * {
width: 100%;
}
#CustomHeader > #CustomNavigation .mega-menu-main {
background: #003d79;
border-top: 0 !important;
color: #ffffff;
height: 40px;
margin-top: 0;
min-height: 40px;
}
#CustomHeader > #CustomNavigation .mega-menu-top-level,
#CustomHeader > #CustomNavigation .menu-item-link,
#CustomHeader > #CustomNavigation .menu-item-text,
#CustomHeader > #CustomNavigation .menu-item-toggle {
color: #ffffff;
}
#CustomHeader > #CustomNavigation .mega-menu-top-item:hover,
#CustomHeader > #CustomNavigation .mega-menu-top-item:focus-within,
#CustomHeader > #CustomNavigation .mega-menu-top-item:active,
#CustomHeader > #CustomNavigation .mega-menu-top-item.is-open,
#CustomHeader > #CustomNavigation .mega-menu-top-item.is-active {
background: #0f548c;
color: #ffffff;
}
/* Das geöffnete Mega Menu nutzt auch die 240-px-Fläche unterhalb des Logos. */
#CustomHeader > #CustomNavigation .mega-menu {
left: -240px;
}
#CustomHeader > #CustomNavigation .mega-menu-grid {
max-width: none;
width: 100%;
}
/* Eigene Suche im freien Bereich rechts neben dem Logo. */
#CustomHeader > #CustomBrandingSearch {
align-self: start;
grid-column: 2;
grid-row: 2;
justify-self: end;
margin: 64px 2px 0 0;
width: 272px;
z-index: 2;
}
.custom-branding-search-form {
align-items: stretch;
background: #ffffff;
border: 1px solid #8a8886;
box-sizing: border-box;
display: flex;
height: 36px;
width: 100%;
}
.custom-branding-search-form:focus-within {
border-color: #605e5c;
box-shadow: inset 0 0 0 1px #605e5c;
}
.custom-branding-search-input {
background: transparent;
border: 0;
box-sizing: border-box;
color: #323130;
flex: 1 1 auto;
font-family: inherit;
font-size: 14px;
min-width: 0;
outline: 0;
padding: 0 12px;
}
.custom-branding-search-input::placeholder {
color: #605e5c;
opacity: 1;
}
.custom-branding-search-button {
align-items: center;
background: transparent;
border: 0;
color: #005a9e;
cursor: pointer;
display: flex;
flex: 0 0 40px;
font-size: 16px;
justify-content: center;
padding: 0;
}
.custom-branding-search-button:hover,
.custom-branding-search-button:focus {
background: #f3f2f1;
color: #004578;
outline: 0;
}
.custom-branding-search-button:focus-visible {
box-shadow: inset 0 0 0 2px #605e5c;
}
.ms-compositeHeader .ms-compositeHeader-searchBoxContainer {
display: none !important;
}
.portal-branding {
align-items: flex-start;
border: 0;
box-sizing: border-box;
display: flex;
height: 220px;
justify-content: flex-start;
padding: 0;
width: 240px;
}
.portal-branding-home {
align-items: flex-start;
color: #323130;
display: block;
width: 240px;
text-decoration: none;
}
.portal-branding-home:hover {
color: #201f1e;
text-decoration: none;
}
.portal-branding-home:focus-visible {
outline: 2px solid #605e5c;
outline-offset: 3px;
}
.portal-branding-logo {
display: block;
height: 220px;
object-fit: contain;
width: 240px;
background-image: url(http://portal.contoso.local/Branding/Images/logo-background.png);
background-repeat: no-repeat;
}
.ms-compositeHeader {
display: none !important;
}
@media (forced-colors: active) {
#CustomHeader,
.portal-branding,
.system-ndzk-bar {
border-color: CanvasText;
}
}