mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Refactor typography styles
- Move all global typography styles to its own file. This makes it easier to find all the typography related definitions for newcomers. - Prefix all typography related global CSS classes with a unique prefix `.txt-`. This allows us to grep the codebase and see exactly where they are applied. Another benefit of this convention is that it helps to avoid accidentally mixing global and local styles. Having global CSS classes that sometimes overlap with component CSS classes makes it very hard to reason about the resulting visuals and making changes unpredictable. - Introduce CSS variables for standardised typography sizes and apply them to the whole codebase consistently. This way we can adjust the size in one place and it will be applied everywhere. - Avoid using predefined HTML tags which might have differing styling from browser to browser, e.g. `<h1>`, `<strong>`. We should stick to applying styling either by adding a specific global CSS class or using the predefined CSS variables, this way we can be sure that the styles won't be overridden by browser defaults. - Have a minimal set of modifiers `.txt-monospace` and `.txt-bold` and apply them consistently. Since `.txt-monospace` is defined via a CSS variable, we'll be able to switch out fonts via a user setting in the future. Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
}
|
||||
label[for="address"] {
|
||||
margin-left: 1.5rem;
|
||||
font-size: 0.75rem;
|
||||
font-size: var(--font-size-tiny);
|
||||
color: var(--color-secondary);
|
||||
}
|
||||
input[name="address"] {
|
||||
@@ -119,7 +119,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
.notice {
|
||||
font-size: 0.875rem;
|
||||
font-size: var(--font-size-small);
|
||||
border-radius: var(--border-radius);
|
||||
color: var(--color-yellow);
|
||||
background-color: var(--color-yellow-background);
|
||||
@@ -136,7 +136,7 @@
|
||||
<span slot="title">🎉</span>
|
||||
|
||||
<span slot="subtitle">
|
||||
<strong>Your org was successfully created.</strong>
|
||||
<span class="txt-bold">Your org was successfully created.</span>
|
||||
</span>
|
||||
|
||||
<span slot="body">
|
||||
@@ -181,7 +181,7 @@
|
||||
{#if state === State.Idle}
|
||||
<div class="configuration">
|
||||
<div class="notice">
|
||||
<strong>Notice:</strong>
|
||||
<span class="txt-bold">Notice:</span>
|
||||
Orgs V1 are being deprecated. It is recommended not to create new orgs
|
||||
at this point.
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
main header {
|
||||
color: var(--color-secondary);
|
||||
font-size: 1.25rem;
|
||||
font-size: var(--font-size-medium);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 1rem 0;
|
||||
@@ -46,8 +46,6 @@
|
||||
}
|
||||
.orgs-empty {
|
||||
padding: 2rem 0 1rem 0;
|
||||
font-style: italic;
|
||||
color: var(--color-foreground-faded);
|
||||
}
|
||||
|
||||
.loading {
|
||||
@@ -64,7 +62,7 @@
|
||||
<div class="my-orgs">
|
||||
<header>
|
||||
<span>
|
||||
My <strong>Orgs</strong>
|
||||
My <span class="txt-bold">Orgs</span>
|
||||
</span>
|
||||
<Button variant="secondary" on:click={onCreate} disabled={!account}>
|
||||
Create
|
||||
@@ -77,12 +75,14 @@
|
||||
</div>
|
||||
{:then orgs}
|
||||
<Cards {config} {orgs}>
|
||||
<div class="orgs-empty">Orgs you are a member of show up here.</div>
|
||||
<div class="orgs-empty txt-missing">
|
||||
Orgs you are a member of show up here.
|
||||
</div>
|
||||
</Cards>
|
||||
{:catch}
|
||||
<div>
|
||||
<Message error>
|
||||
<strong>Error:</strong>
|
||||
<span class="txt-bold">Error:</span>
|
||||
failed to load orgs.
|
||||
</Message>
|
||||
</div>
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<header>
|
||||
<span>
|
||||
<strong>Orgs</strong>
|
||||
<span class="txt-bold">Orgs</span>
|
||||
of the Radicle network
|
||||
</span>
|
||||
</header>
|
||||
@@ -108,7 +108,7 @@
|
||||
{:catch}
|
||||
<div>
|
||||
<Message error>
|
||||
<strong>Error:</strong>
|
||||
<span class="txt-bold">Error:</span>
|
||||
failed to load orgs.
|
||||
</Message>
|
||||
</div>
|
||||
|
||||
@@ -78,9 +78,11 @@
|
||||
<div slot="title">✅</div>
|
||||
|
||||
<div slot="subtitle">
|
||||
The ownership of <strong>{formatAddress(org.address)}</strong>
|
||||
The ownership of <span class="txt-bold">
|
||||
{formatAddress(org.address)}
|
||||
</span>
|
||||
was successfully transfered to
|
||||
<strong>{newOwner}</strong>
|
||||
<span class="txt-bold">{newOwner}</span>
|
||||
.
|
||||
</div>
|
||||
|
||||
@@ -96,11 +98,11 @@
|
||||
|
||||
<div slot="subtitle">
|
||||
<p>
|
||||
The transaction to set the owner of <strong>
|
||||
The transaction to set the owner of <span class="txt-bold">
|
||||
{formatAddress(org.address)}
|
||||
</strong>
|
||||
</span>
|
||||
to
|
||||
<strong>{newOwner}</strong>
|
||||
<span class="txt-bold">{newOwner}</span>
|
||||
was proposed to:
|
||||
</p>
|
||||
<p><Address address={org.owner} {config} compact /></p>
|
||||
@@ -126,12 +128,12 @@
|
||||
Waiting for transaction to be processed...
|
||||
{:else if state === State.Proposing && org}
|
||||
Proposal is being submitted to the safe
|
||||
<strong>{formatAddress(org.owner)}</strong>
|
||||
<span class="txt-bold">{formatAddress(org.owner)}</span>
|
||||
, please sign the transaction in your wallet.
|
||||
{:else if state === State.Idle}
|
||||
Transfer the ownership of Org <strong>
|
||||
Transfer the ownership of Org <span class="txt-bold">
|
||||
{formatAddress(org.address)}
|
||||
</strong>
|
||||
</span>
|
||||
to a new address.
|
||||
{:else if state === State.Failed}
|
||||
<div class="error">
|
||||
|
||||
Reference in New Issue
Block a user