Skip to content

Commit cc9180e

Browse files
committed
style(surface): polish Govern Act layout and doctrine transitions
1 parent 3fcccee commit cc9180e

2 files changed

Lines changed: 34 additions & 37 deletions

File tree

src/App.vue

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ onBeforeUnmount(() => {
218218

219219
<template>
220220
<main class="surface-home" :class="{ 'is-reduced-motion': prefersReducedMotion }">
221-
222221
<section class="surface-document" aria-label="Axone Surface">
223222
<nav class="surface-bar" aria-label="Surface heading">
224223
<p class="surface-mark">AXONE <span class="surface-mark-separator">/</span> SURFACE</p>
@@ -390,23 +389,24 @@ onBeforeUnmount(() => {
390389
</nav>
391390

392391
<header class="doctrine-hero">
393-
<Transition name="law-fade" mode="out-in">
394-
<p
395-
:key="activeLaw.id"
396-
class="law-line"
397-
:aria-label="`${activeLaw.number} / ${activeLaw.title} - ${activeLaw.paraphrase}`"
398-
aria-live="polite"
399-
aria-atomic="true"
400-
>
401-
<span class="law-number">{{ activeLaw.number }}</span>
402-
<span class="law-content">
403-
<span class="law-title">{{ activeLaw.title }}</span>
404-
<span class="law-separator" aria-hidden="true">—</span>
405-
<span class="law-paraphrase">{{ activeLaw.paraphrase }}</span>
392+
<p
393+
class="law-line"
394+
:aria-label="`${activeLaw.number} / ${activeLaw.title} - ${activeLaw.paraphrase}`"
395+
aria-live="polite"
396+
aria-atomic="true"
397+
>
398+
<Transition name="law-fade" mode="out-in">
399+
<span :key="activeLaw.id" class="law-statement">
400+
<span class="law-number">{{ activeLaw.number }}</span>
401+
<span class="law-content">
402+
<span class="law-title">{{ activeLaw.title }}</span>
403+
<span class="law-separator" aria-hidden="true">—</span>
404+
<span class="law-paraphrase">{{ activeLaw.paraphrase }}</span>
405+
</span>
406406
</span>
407-
<span class="law-rule" aria-hidden="true"></span>
408-
</p>
409-
</Transition>
407+
</Transition>
408+
<span class="law-rule" aria-hidden="true"></span>
409+
</p>
410410
<h1>GOVERN<br /><span class="act">ACT</span></h1>
411411
<p class="actor-line" aria-live="polite" aria-atomic="true">
412412
<Transition name="actor-turn" mode="out-in">

src/styles.css

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@
7979
background: var(--color-surface-bg);
8080
}
8181

82-
83-
8482
.surface-document {
8583
position: relative;
8684
z-index: 1;
@@ -544,6 +542,14 @@
544542
word-break: break-word;
545543
}
546544

545+
.law-statement {
546+
display: flex;
547+
flex: 0 1 auto;
548+
gap: 12px;
549+
align-items: baseline;
550+
min-width: 0;
551+
}
552+
547553
.law-number {
548554
flex: none;
549555
color: var(--color-surface-gold);
@@ -609,7 +615,7 @@
609615
}
610616

611617
.doctrine-hero h1 .act {
612-
color: var(--color-surface-text-quiet);
618+
color: #5a574d;
613619
font-style: italic;
614620
}
615621

@@ -994,13 +1000,19 @@
9941000

9951001
.law-line {
9961002
display: grid;
997-
grid-template-columns: auto minmax(0, 1fr);
998-
gap: 8px 10px;
1003+
grid-template-columns: minmax(0, 1fr);
1004+
gap: 8px;
9991005
width: 100%;
10001006
max-width: 100%;
10011007
line-height: 1.4;
10021008
}
10031009

1010+
.law-statement {
1011+
display: grid;
1012+
grid-template-columns: auto minmax(0, 1fr);
1013+
gap: 10px;
1014+
}
1015+
10041016
.law-content {
10051017
display: block;
10061018
}
@@ -1589,21 +1601,6 @@
15891601
margin: 16px 0 0;
15901602
}
15911603
}
1592-
1593-
@media (min-width: 761px) {
1594-
.surface-act-stream {
1595-
--surface-act-gutter: clamp(24px, 4vw, 64px);
1596-
width: 100vw;
1597-
margin-left: calc(50% - 50vw);
1598-
padding-right: var(--surface-act-gutter);
1599-
padding-left: var(--surface-act-gutter);
1600-
}
1601-
1602-
.surface-act-stream-head {
1603-
padding-right: 0;
1604-
padding-left: 0;
1605-
}
1606-
}
16071604
}
16081605

16091606
@keyframes heartbeat {

0 commit comments

Comments
 (0)