Home Blog Certs Knowledge Base About

CSS โ€” Architecture & Class Reference

CSS architecture

Styles are split into 8 files by scope (area of application):

FileLoadedPurpose
global.csseverywhereVariables, nav, base components, dot-grid pagination
mobile.csseverywhereMobile nav, breakpoints
fonts.csseverywhere@font-face for Inter (body), JetBrains Mono (code), Unbounded (headings)
prose.cssposts, about, kb, docsArticle typography, NS cards/tabs/ref-panel, section divider
home.css/ onlyHero, recent posts, KB grid, cert-grid
cert.css/certs/*Cert hero, resource tiles, accordion topics
quiz.css/ccna-quiz/*Quiz cards, option states, scoring badges
ns.css/posts/linux-namespaces/Two-column page layout, TOC sidebar, progress, filter row
chroma.csseverywhereSyntax highlighting (Dracula dark / GitHub light)

Loading in baseof.html:

<link rel="stylesheet" href="/styles/fonts.css">    <!-- always -->
<link rel="stylesheet" href="/styles/global.css">   <!-- always -->
<link rel="stylesheet" href="/styles/chroma.css">   <!-- always -->
{{ if .IsHome }}<link href="/styles/home.css">{{ end }}
{{ if or (eq .Type "posts") (eq .Type "about") (eq .Type "docs") (eq .Type "kb") }}
  <link href="/styles/prose.css">{{ end }}
<link rel="stylesheet" href="/styles/mobile.css">   <!-- always -->
{{ block "head" . }}{{ end }}  <!-- cert.css / quiz.css / ns.css added here -->

CSS variables โ€” themes

Variables are declared on [data-theme="dark"] and [data-theme="light"]:

VariableDarkLightPurpose
--accent#00d4ff#00d4ffPrimary accent (cyan)
--accent2#7c3aed#7c3aedSecondary accent (purple)
--accent3#10b981#10b981Third accent (green)
--warn#f59e0b#f59e0bWarning (amber)
--danger#ef4444#ef4444Danger / error (red)
--bg#13151f#f5f7faMain background
--bg2#1c1f2e#ffffffCards, panels
--bg3#252840#eef2f8Hover states
--border#2d3356#d1dbe8Borders
--border2#353a60#c2cfe0Secondary borders
--text#e2e8f0#1a2235Primary text
--text2#94a3b8#475569Secondary text
--text3#64748b#94a3b8Muted text (date, meta)
--glowrgba(0,212,255,0.08)rgba(0,150,180,0.06)Hover highlight
--tag-bgrgba(0,212,255,0.08)rgba(0,150,180,0.08)Tag background
--tag-color#67e8f9#0369a1Tag text color
--grid-linergba(0,212,255,0.03)rgba(0,150,180,0.04)Dot-grid background lines
--shadow0 4px 24px rgba(0,0,0,0.5)0 4px 24px rgba(0,0,0,0.10)Box shadow
--nav-blurrgba(19,21,31,0.85)rgba(245,247,250,0.90)Nav backdrop blur color
--code-bg#0d1520#f6f8faCode block background

Per-component variables (set via inline style=""):

VariableUsed byDescription
--cNS cards, map buttons, tabs, filter buttonsPer-card accent color
--cert-colorCert hero, resource tilesPer-cert accent color

global.css โ€” class reference

Reset and base styles

Class / SelectorDescription
*, *::before, *::afterbox-sizing: border-box, margin/padding reset
bodybackground: var(--bg), color: var(--text), font-family: 'Inter', system-ui, sans-serif
acolor: inherit, text-decoration: none
ClassDescription
.desk-navFlex container: logo + links + right panel. Sticky, z-index: 100
.nav-logoLogo with gradient text
.nav-links a.activeActive link: color: var(--accent)
.lang-btnEN/RU buttons
.theme-btn๐ŸŒ™/โ˜€๏ธ theme toggle
ClassDescription
.breadcrumbFlex row with / separators. Rendered site-wide via partial "breadcrumb.html"
.breadcrumb acolor: var(--text3), hover โ†’ accent

Panels

ClassDescription
.panelCard: background: var(--bg2), border, border-radius: 10px, padding: 20px
.panel-headFlex panel header: .panel-title + .panel-more
.sec-titleH2 section heading (Unbounded font, gradient)

Articles (post-card โ€” blog list)

ClassDescription
.posts-listFlex column with gap
.post-cardArticle card: lifts 2px on hover
.post-card-metaRow: date + tags
.post-card-titleArticle title in card
.post-card-descShort description

Article header (single page)

Defined in prose.css. Used in _default/single.html for all article pages.

ClassDescription
.post-headerWraps h1 + .post-meta. border-bottom separator, margin-bottom: 28px
.post-metaFlex column: date on top, tags row below
.post-meta .post-dateDate in dd/mm/yyyy format. color: var(--text3)
.post-meta-tagsFlex-wrap row of tag links

Tags

ClassDescription
.tagdisplay: inline-flex, background: var(--tag-bg), border-radius: 4px
.tag:hoverborder-color: var(--accent), color: var(--accent)
.tag.activeActive filter on /tags/
.tag-lgLarger tag on /tags/ page

Knowledge Base cards

ClassDescription
.kb-cardsGrid: auto-fill, min 220px columns, gap 12px
.kb-cardCard: position: relative, hover lifts 2px, border accent on hover
.kb-card-iconEmoji icon, font-size: 20px
.kb-card-titleCard title: 13px, semi-bold
.kb-card-descDescription: 11.5px, var(--text3)
.kb-card-tagsFlex-wrap row of small tags
.kb-card-metaPage count badge: position: absolute, bottom-right corner, pill style
.kb-card-sectionSection card variant: border-color: var(--border2), padding-bottom: 32px
.kb-section-titleGroup heading above a .kb-cards grid
.kb-emptyEmpty state message

body uses display: flex; flex-direction: column + min-height: 100vh.
footer has margin-top: auto โ€” always pushed to bottom of viewport on short pages.

Pagination (dot-grid)

Shared by both blog (pagination.html partial) and quiz (hardcoded in ccna-quiz/single.html).

ClassDescription
.pg-dot-navFlex container: Prev button + dot grid + Next button
.pg-dot-gridFlex-wrap row of page number links
.pg-dotIndividual page link: small square tile
.pg-dot.curCurrent page: background: var(--accent), white text
.pg-btnPrev / Next arrow button
.pg-btn.disabledInactive arrow (first/last page)
ClassDescription
.search-wrapContainer for absolutely positioned results
.search-inputSearch input: background: var(--bg2)
#searchResultsCreated by JS dynamically

Certifications grid (home / about)

ClassDescription
.cert-grid4-column grid
.cert-cardCard with --cert-color custom variable
.cert-badgeEmoji icon
.cert-nameName (Unbounded font, color: var(--cert-color))
.cert-subSubtitle

mobile.css โ€” class reference

ClassDescription
.mob-navMobile top nav (hidden on desktop)
.burgerHamburger menu button (3 lines โ†’ X on open)
.mob-drawerSlide-out menu
.mob-bottom-navBottom navigation bar
.mob-bnav-item.activecolor: var(--accent)
BreakpointWhat changes
max-width: 860pxDesktop nav hidden, mobile nav + bottom bar visible; footer hidden
max-width: 560pxReduced padding; .cert-grid โ†’ 2 columns

prose.css โ€” article content + shared components

Applied to .prose (article body) and available in any post, KB, or docs page.

Article body

SelectorDescription
.prose h2, .prose h3Headings with border-bottom
.prose codeInline code: background: var(--bg3)
.prose blockquoteQuote: border-left: 3px solid var(--accent)
.prose tableFull-width, collapsed borders
.prose acolor: var(--accent) with underline

Shared components

ClassDescription
.intro-cardHighlighted intro block: border-left: 3px solid var(--accent)
.secSection divider: uppercase label + full-width line after
.code-blockCode wrapper: label bar + Chroma content
.code-labelBar: language + copy button
.copy-btn“copy” โ†’ “ok!” (resets after 1.5s)
.ns-gridCard grid for NS cards
.ns-cardExpandable card with --c color variable. Animated via @keyframes fadeUp
.ns-card.activeExpanded: border-color: var(--c)
.ns-headerCard header: icon + name + flag + toggle chevron
.ns-bodyHidden body, shown when .active
.ns-mapNamespace map widget
.ns-map-btnMap tile: flex-column, icon + name + flag. Hover uses color-mix(--c)
.tabsTab button row
.tab-btnTab button. Active/hover uses --c
.tab-content.activeVisible tab panel
.ref-panelReference table wrapper
.ref-panel-headUppercase panel heading
.ref-panel-bodyScrollable table area
.cheat-tableData table inside .ref-panel
.cheat-table .monocolor: var(--accent)
.stagInline namespace type badge
.stag-uts/.stag-pid/.stag-net/โ€ฆPer-type color variants
.back-link“โ† Back to posts” link at page bottom

ToC sidebar (in _default/single.html)

ClassDescription
.prose-page.has-tocdisplay: grid; grid-template-columns: 1fr 240px
.toc-asideRight ToC column, sticky
.toc-itemLink to a heading
.toc-item.curActive heading: color: var(--accent)

cert.css โ€” certification pages

ClassDescription
.cert-heroHero block. --cert-color sets border and text color
.cert-hero-badgeEmoji icon
.cert-hero-nameCert name (Unbounded font)
.cert-hero-descDescription text
.cert-resourcesFlex row of resource tiles
.cert-resource-cardTile: flex-column, icon + title + desc. Hover uses color-mix(--cert-color)
.cert-resource-iconEmoji icon at top of tile
.cert-resource-bodyFlex-column wrapper for title + desc
.cert-resource-titleTile title (JetBrains Mono, bold)
.cert-resource-descTile description
.cert-statsStats row: N exams ยท N topics ยท N articles
.exam-blockGroup of topics for one exam code
.exam-labelExam heading (uppercase)
.cert-topicOne accordion item
.cert-topic.openExpanded: border-color: var(--accent)
.cert-topic-headAccordion header button
.topic-numTopic number: color: var(--accent)
.topic-chevronโ€บ, rotates 90ยฐ with .open
.cert-topic-bodyAccordion body: max-height: 0 โ†’ scrollHeight via JS
.cert-post-linkLink to an article inside a topic
.cert-post-titleArticle title: color: var(--accent)

quiz.css โ€” CCNA quiz

ClassDescription
.quiz-disclaimerWarning notice at the top of quiz pages
.quiz-index-gridGrid of 49 page tiles
.quiz-index-tilePage tile with number
.quiz-page-headerPage title + progress bar
.quiz-progress-barThin accent-colored progress indicator
.q-cardQuestion card wrapper
.q-numQuestion number badge
.q-textQuestion body text
.q-imageQuestion image (max-width: 100%)
.q-multi-hint“Choose N” badge for multi-answer questions
.q-optionsList of answer options
.q-optionSingle option: radio/checkbox + label
.q-option.selectedUser-selected option
.q-option.correctCorrect option (after reveal): green
.q-option.wrongWrong selected option: red
.q-option.missedCorrect option user missed: yellow
.reveal-btn“Show Answer” / “Hide Answer” toggle
.score-badgeInline score: correct / total
.q-explanationExplanation text shown after reveal

ns.css โ€” linux-namespaces page layout

Loads only for /posts/linux-namespaces/. All shared components (NS cards, tabs, map buttons, ref-panel, stags) are in prose.css.

ClassDescription
.ns-page-wrapTwo-column grid: 1fr 240px
.ns-page-mainLeft content column
.ns-page-asideRight sidebar (sticky, hidden on mobile)
.toc-boxContents panel in sidebar
.toc-itemHeading link in TOC
.toc-item.hlActive heading
.progress-boxReading progress panel
.progress-fillAnimated fill bar
.filter-rowFilter buttons row for cheatsheet
.f-btnFilter button, uses --c
.f-btn.onActive filter
.ns-preCode output area with custom syntax colors