Skip to content

Commit

Permalink
chore(docs): cleanup styles (#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtBlue authored Jan 15, 2025
1 parent 424839a commit 0f23083
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 449 deletions.
19 changes: 19 additions & 0 deletions src/components/site-footer.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import siteMeta from "./data/site.json"
style {
footer {
background: var(--color-menu-background);
margin-top: var(--spacing-400);
padding: 15px;
}
}

<footer class="page-grid-container">
<nav class="primary-nav footer-nav" aria-label="Site navigation">
<ul role="menubar">
<li><anchor role="menuitem" href="archive/index.html">Archive (v${siteMeta.version})</anchor></li>
<li><a role="menuitem" href="https://github.com/eBay/skin">Repo</a></li>
<li><a role="menuitem" href="/storybook">Storybook</a></li>
</ul>
</nav>
Copyright &copy; 2025 eBay, Inc. All rights reserved.
</footer>
4 changes: 2 additions & 2 deletions src/components/site-header.marko
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ import {components} from './components.marko';

<div class="details__content">
<nav class="components-nav" aria-labelledby="components-nav__title">
<h2 class="components-nav__title">CSS Components</h2>
<h2 id="components-nav__title" class="components-nav__title">CSS Components</h2>
<ul class="modules-expander__list" role="menubar">
<components-list components=components/>
</ul>
</nav>

<nav class="examples-nav" aria-labelledby="examples-nav__title">
<h2 class="examples-nav__title">Guides</h2>
<h2 id="examples-nav__title" class="examples-nav__title">Guides</h2>
<ul class="modules-expander__list" role="menubar">
<li>
<anchor href="guide/page-grid" role="menuitem">Page Grid Use Guide</anchor>
Expand Down
244 changes: 244 additions & 0 deletions src/components/site-header.style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
@import "../sass/variables/variables";

header {
background-color: var(--color-background-accent);
min-height: 100px;
}

/* HEADER */
.app-bar {
align-items: center;
box-sizing: border-box;
color: var(--color-neutral-100);
/* display: flex; */
display: grid;
grid-area: 1 / 1 / span 1 / span 8;
/* justify-content: space-between; */
margin: 0 auto;
padding: var(--spacing-200) 0;
width: 100%;
}

.app-bar__title {
margin: 0;
}

.app-bar__title a,
.app-bar__title a:visited {
color: var(--color-foreground-on-inverse);
text-decoration: none;
}

.app-bar__title a:hover {
text-decoration: underline;
}

.app-bar__links {
list-style-type: none;
margin: 0;
padding: 0;
}

.app-bar__links li:not(:last-child)::after {
content: "";
margin: 0 var(--spacing-100);
}

.app-bar__links a {
color: var(--color-foreground-primary);
display: inline-block;
padding-block: var(--spacing-150);
text-decoration: none;
}

.app-bar__links a:hover {
text-decoration: underline;
}

.app-bar__links a:focus {
outline: 1px auto var(--color-foreground-primary);
}

.app-bar__links a:visited {
color: var(--color-foreground-primary);
}

.top-bar {
align-items: center;
display: grid;
grid-template:
"leading content trailing"
"fullrow fullrow fullrow"
/ 50px 1fr;
position: relative;
}

.app-bar-menu {
grid-area: leading;
}

.app-bar__title {
grid-area: content;
}

.primary-nav:not(.footer-nav) {
background-color: var(--color-background-secondary);
border: 1px solid var(--color-stroke-subtle);
border-radius: 3px;
box-shadow: var(--shadow-subtle);
display: none;
font-size: var(--spacing-200);
grid-area: fullrow;
padding: var(--spacing-200);
position: absolute;
top: 3px;
width: 90%;
z-index: 1;
}

.primary-nav.footer-nav {
display: block;
margin-bottom: 10px;
}

.primary-nav.footer-nav a,
.primary-nav.footer-nav a:visited {
color: var(--color-foreground-secondary);
}

.primary-nav.footer-nav ul {
display: flex;
gap: 10px;
margin: 0;
padding: 0;
}

.primary-nav.footer-nav ul li::marker {
content: "";
font-size: 0;
}

.secondary-nav li {
line-height: 1.25em;
margin-bottom: 0.75em;
}

.mobile-nav-toggle {
border: 1px solid var(--color-background-primary);
border-radius: 2px;
/* flex-shrink: 0; */
height: 28px;
justify-items: center;
margin-top: 2px;
padding: 0;
position: static;
width: 28px;
}

.mobile-menu__icon {
align-items: center;
display: flex;
height: 28px;
justify-content: center;
width: 28px;
}

svg.icon.mobile-menu__close {
display: none;
}

.mobile-nav-toggle[aria-expanded="true"] svg.icon.mobile-menu__open {
display: none;
}

.mobile-nav-toggle[aria-expanded="true"] ~ .primary-nav {
display: block;
}

.mobile-nav-toggle[aria-expanded="true"] svg.icon.mobile-menu__close {
display: block;
}

@media screen and (min-width: $_screen-size-SM) {
.app-bar {
grid-area: 1 / 1 / span 1 / span 16;
}

.modules-expander {
padding-left: 30px;
}
}

@media screen and (min-width: $_screen-size-MD) {
.modules-expander {
display: none;
}

header {
min-height: auto;
}

.app-bar {
grid-area: 1 / 1 / span 1 / span 16;
}

.top-bar {
grid-template-columns: auto auto auto;
}

.app-bar__title {
grid-area: leading;
}

.app-bar__links {
display: flex;
flex-direction: row;
flex-shrink: 0;
list-style-type: none;
margin-left: var(--spacing-100);
}

.app-bar__links a {
color: var(--color-foreground-on-inverse);
padding-block: 0;
}

.app-bar__links a:focus {
outline: 1px auto var(--color-foreground-on-inverse);
}

.app-bar__links a:visited {
color: var(--color-foreground-on-inverse);
}

.mobile-nav-toggle {
display: none;
}

.primary-nav:not(.footer-nav) {
background-color: transparent;
border: none;
border-radius: 0;
box-shadow: none;
display: block;
font-size: inherit;
grid-area: trailing;
justify-self: right;
padding: 0;
position: static;
width: auto;
}
}

@media screen and (min-width: $_screen-size-XL) {
#about dl {
column-count: 2;
}
}

@media screen and (min-width: $_screen-size-XL3) {
.app-bar {
padding-left: 0;
padding-right: 0;
}
}
12 changes: 1 addition & 11 deletions src/routes/_index/+layout.marko
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import siteMeta from "../../components/data/site.json"
<!doctype html>
<html lang="en">
<head>
Expand All @@ -19,15 +18,6 @@ import siteMeta from "../../components/data/site.json"
</main>
</div>
</div>
<footer class="page-grid-container">
<nav class="primary-nav footer-nav" aria-label="Site navigation">
<ul role="menubar">
<li><anchor role="menuitem" href="archive/index.html">Archive (v${siteMeta.version})</anchor></li>
<li><a role="menuitem" href="https://github.com/eBay/skin">Repo</a></li>
<li><a role="menuitem" href="/storybook">Storybook</a></li>
</ul>
</nav>
Copyright © 2025 eBay, Inc. All rights reserved.
</footer>
<site-footer/>
</body>
</html>
Loading

0 comments on commit 0f23083

Please sign in to comment.