-
Notifications
You must be signed in to change notification settings - Fork 6
Initial navigation styles #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8f93a81
50b71b8
252d0e5
ca6bf01
1700f00
7f94c16
cd4feff
d3b86d8
055d33d
003d97a
89a3c95
6edd98e
0d659a2
54da009
97612e3
da29f00
1eec46f
4ca5380
a6ea597
265b976
d1ad911
ebcc339
ef46026
a74bac5
59f93fd
18c324a
16c48d4
0d35026
451d8ec
0ee97d4
665beaa
c296b5d
8813bff
012bb87
5ce9b5a
e95660a
ca7a333
e4e6e21
0640b01
dbf810d
744b22b
64a90d0
2083a3f
542caf7
56d669a
ebaf9af
89f6601
14d1d3c
eacbbb4
0c4e2ef
ef096ba
5903411
27cd62e
b6ff11c
cd7adc4
f7ff720
fbc436b
9922fe0
c01e1b3
9fa49ef
2d7c13e
6e35464
236d54d
48942fc
5fd46fe
d3e461d
7f68eb9
b2e76c2
5d57532
6e7b064
393a277
5e4bea3
ceb7a7e
f2218c8
a893474
7c95d7d
4194f7a
b8b6669
0377147
80a0c18
0508f0f
6496310
66329a7
bf41fc1
1478e85
d488895
7959fe3
073a58f
aa2ed82
f0cfc7d
c49ca88
ed842f3
4a55db6
b130820
ba6daab
f19f19a
cb97359
74e701c
afe1976
643288c
fd89755
ceb38c0
506730c
2131ef3
7b7cb89
3b910e2
a92ca16
82b6f87
270a4d3
3c4c5ff
852a3b6
8430c51
cf48671
361c8c0
1809ad0
71a76da
8abcfa1
c7c01fc
ebb4913
fdfbfdf
e71a854
2dbfeb2
2971e80
d93a520
333b8bd
c65590c
7ee0d4b
5d09881
a902d57
fb6d66e
6a10f79
9ac4c9c
d1af1df
2698f7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,21 +3,238 @@ | |
| --primary-saturation: 100%; | ||
| /* Hextra adds 5% in most places */ | ||
| --primary-lightness: 70%; | ||
| font-family: "Roboto"; | ||
| font-family: "Roboto Flex"; | ||
| --container-max-width: 1536px; | ||
| } | ||
|
|
||
| .sidebar-active-item { | ||
| background-color: transparent; | ||
| @view-transition { | ||
| navigation: auto; | ||
| } | ||
|
|
||
| html { | ||
| scrollbar-width: thin; | ||
| scroll-behavior: smooth; | ||
| } | ||
|
|
||
| html[class~="dark"] { | ||
| line-height: 1.4; | ||
| scrollbar-color: hsla(0, 0%, 100%, .39) #000; | ||
| } | ||
|
|
||
| body:is(html[class~="dark"] *) { | ||
| background: #000; | ||
| color: rgb(255 255 255 / var(--tw-text-opacity)); | ||
| /* all text on live has increased letter-spacing. buttons do not, so use tracking-normal when needed. negates the need for tracking-wide on every instance of a heading or copy */ | ||
| letter-spacing: 0.025em; | ||
| } | ||
|
|
||
| @media (min-width: 768px) { | ||
| .nav-container nav { | ||
| justify-content: flex-start; | ||
| gap: 1.5rem; | ||
| max-width: var(--container-max-width); | ||
| padding: 0 3rem; | ||
| } | ||
| .nav-container nav > a { | ||
| margin: 0; | ||
| } | ||
| .nav-container nav > a[href="/"] { | ||
| padding-right: 1.5rem; | ||
| } | ||
| .nav-container + div { | ||
| max-width: var(--container-max-width); | ||
| padding: 1rem 3rem; | ||
| } | ||
| } | ||
|
|
||
| .nav-container nav > a { | ||
| font-size: 1.125rem; | ||
| line-height: 1.5rem; | ||
| font-weight: 600; | ||
| letter-spacing: .025em; | ||
| padding: 0; | ||
| position: relative; | ||
| } | ||
|
|
||
| .nav-container:is(html[class~="dark"] *) nav > a { | ||
| color: hsla(0,0%,100%,.65); | ||
| } | ||
|
|
||
| .nav-container:is(html[class~="dark"] *) nav > a.hx-font-medium { | ||
| color: #fff; | ||
| } | ||
|
|
||
| .nav-container nav > a.hx-font-medium::after { | ||
| content: ""; | ||
| position: absolute; | ||
| bottom: -0.5rem; | ||
| left: 50%; | ||
| display: block; | ||
| clip-path: polygon(0px 100%, 5px calc(100% - 6px), calc(100% - 5px) calc(100% - 6px), 100% 100%); | ||
| opacity: 1; | ||
| width: 100%; | ||
| height: 0.25rem; | ||
| background: rgb(255 70 78/var(--tw-bg-opacity)); | ||
| animation: nav-underline forwards 300ms; | ||
| transform: translateX(-50%) | ||
| } | ||
|
|
||
| @keyframes nav-underline { | ||
| from { width: 0%; } | ||
| to { width: 100%; } | ||
| } | ||
|
|
||
| .nav-container nav > a[href="/"] img { | ||
| height: 1.5rem; | ||
| width: auto; | ||
| } | ||
|
|
||
| .nav-container .search-wrapper { | ||
| margin-left: auto; | ||
| } | ||
| @supports ( ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) ) { | ||
| .nav-container-blur:is(html[class~="dark"] *) { | ||
| background-color: rgb(0 0 0 / 0.9) !important; | ||
| box-shadow: none; | ||
| } | ||
| } | ||
|
|
||
| /* search styling inline with current website inputs - to be changed to underline (as per the design) if/when the website is updated */ | ||
| [type=text]:is(html[class~="dark"] *), | ||
| [type=search]:is(html[class~="dark"] *) { | ||
| background: #141414; | ||
| border: thin solid #2d2727; | ||
| border-radius: 0.375rem; | ||
| } | ||
| [type=text]:is(html[class~="dark"] *):focus, | ||
| [type=search]:is(html[class~="dark"] *):focus { | ||
| border-color: #fff; | ||
| box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5), 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%), 0 1px 1px 0 rgba(255, 255, 255, 0.12); | ||
| transition: background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease, color 0.15s ease; | ||
| } | ||
| [type=text]:is(html[class~="dark"] *):focus, | ||
| [type=search]:is(html[class~="dark"] *):focus-visible { | ||
| outline: none; | ||
| } | ||
|
|
||
| /* sidebar navigation */ | ||
|
|
||
| .sidebar-container a { | ||
| padding-left: 0; | ||
| } | ||
|
|
||
| .sidebar-container a:hover, | ||
| .sidebar-container:is(html[class~="dark"] *) a:hover { | ||
| background: transparent; | ||
| } | ||
|
|
||
| .sidebar-active-item, | ||
| .sidebar-active-item:is(html[class~="dark"] *) { | ||
| background-color: transparent; | ||
| } | ||
|
|
||
| .hextra-footer { | ||
| background-color: transparent; | ||
| /* sidebar open nav line */ | ||
| .sidebar-container li.open ul::before { | ||
| left: -0.5rem; | ||
| } | ||
|
|
||
| /* sidebar navigation mobile */ | ||
| @media (max-width: 767px) { | ||
| .sidebar-container:is(html[class~="dark"] *) { | ||
| background: #000; | ||
| } | ||
| } | ||
|
|
||
| /* sidebar navigation desktop */ | ||
| @media (min-width: 768px) { | ||
| .sidebar-container > .hextra-scrollbar { | ||
| padding-left: 0; | ||
| padding-right: 0; | ||
| } | ||
| } | ||
|
|
||
| /* toc */ | ||
| .hextra-toc { | ||
| padding: 0; | ||
| } | ||
|
|
||
| /* TODO: Add a class for this upstream */ | ||
| .hextra-toc > div > div { | ||
rabbled marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| box-shadow: none !important; | ||
| background: transparent !important; | ||
| border-color: hsla(0, 0%, 100%, 0.2) !important; | ||
| } | ||
|
|
||
| /* breadcrumbs */ | ||
| /* TODO: Add a class for this upstream */ | ||
| main > div:first-child:not(.content) { | ||
rabbled marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| margin-bottom: 2rem; | ||
| } | ||
|
|
||
| .hextra-footer, | ||
| .hextra-footer:is(html[class~="dark"] *) { | ||
| background-color: transparent; | ||
| } | ||
|
|
||
| .hextra-tabs { | ||
| position: relative; | ||
| } | ||
|
|
||
| .hextra-tabs::after { | ||
| content: ""; | ||
| position: absolute; | ||
| top: 0; | ||
| left: 1px; | ||
| right: 1px; | ||
| border-top: thin solid hsla(0, 0%, 100%, 0.2); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add dark theme selector for this color
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hextra-tabs are a little broken, so i'll need to rework some CSS - I'm not sure if your changes adjusted something, or whether I've broken them. Either way, they'll get a once over before use. |
||
| } | ||
|
|
||
| .hextra-tabs-toggle { | ||
| position: relative; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .hextra-tabs-toggle[data-state="selected"]::after { | ||
| content: ""; | ||
| position: absolute; | ||
| top: 0; | ||
| left: 50%; | ||
| z-index: 1; | ||
| display: block; | ||
| clip-path: polygon(0px 100%, 5px calc(100% - 6px), calc(100% - 5px) calc(100% - 6px), 100% 100%); | ||
| opacity: 1; | ||
| width: 100%; | ||
| height: 0.25rem; | ||
| background: rgb(255 70 78/var(--tw-bg-opacity)); | ||
| animation: nav-underline forwards 300ms; | ||
| transform: translateX(-50%) rotate(180deg); | ||
| } | ||
|
|
||
| .card .hextra-tabs { | ||
| margin-left: -1.5rem; | ||
| margin-right: -1.5rem; | ||
| } | ||
| .card .hextra-tabs-panel { | ||
| padding-left: 1.5rem; | ||
| padding-right: 1.5rem; | ||
| } | ||
|
|
||
| .card .button { | ||
| margin-top: auto; | ||
| align-self: start; | ||
| } | ||
|
|
||
| /* content */ | ||
|
|
||
| .content :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)) { | ||
| border: none; | ||
| } | ||
|
|
||
| .content :where(p):not(:where([class~=not-prose],[class~=not-prose] *)):is(html[class~="dark"] *) { | ||
| color: rgb(255 255 255 / 0.8); | ||
rabbled marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| line-height: 1.4; | ||
| } | ||
|
|
||
| hr:is(html[class~="dark"] *) { | ||
| border-color: hsla(0, 0%, 100%, 0.2); | ||
rabbled marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These
[type=text][type=search]styles are not needed, soon you will be able to insert search inputs that match the styling.In another comment I said to remove search for now, so remove these styles too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is used to theme the search bar top right. I don't believe that is exposed, unless we wish to edit template files.