Skip to content

Commit 0ccccde

Browse files
authored
Migrate to Enhance Styles 5 (#168)
* Enhance Styles 5, landing page migration * Margin/padding migration, cleanup of unused docs * Update lockfile * Whoops, missed a few
1 parent 7f9e76e commit 0ccccde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1404
-13699
lines changed

app.arc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ enhance/arc-plugin-enhance
99

1010
@enhance-styles
1111
filename css/styles.css
12-
config css-config.json
12+
config styleguide.json
1313

1414
@bundles
1515
mux-player 'node_modules/@mux/mux-player'

app/api/docs/$$.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import HljsLineWrapper from '../../docs/hljs-line-wrapper.mjs'
1212
const arcdown = new Arcdown({
1313
pluginOverrides: {
1414
markdownItToc: {
15-
containerClass: 'toc mb2 ml-2',
15+
containerClass: 'toc mbe2 mis-2',
1616
listType: 'ul',
1717
},
1818
},

app/docs/md/learn/concepts/routing/lifecycle.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The journey of an HTTP request through Enhance isn't complicated, but it's helpf
88

99
</doc-callout>
1010

11-
<doc-enhance-diagram class="block mb2">
11+
<doc-enhance-diagram class="block mbe2">
1212
</doc-enhance-diagram>
1313

1414
## Routing

app/docs/md/learn/concepts/styling/enhance-styles/modular-scales.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Traditionally, designers and developers have taken to using different scale valu
2525
Fluid scales allow font sizes, margins, padding, and other aspects of layouts to scale in size gradually across a range of viewport sizes, as opposed to changing suddenly at discrete breakpoints via media queries. Taking the previous example with our `h1`, a fluid scale would allow the heading’s font size to scale gradually between 2rem and 4rem based on the current viewport size (as long as that viewport size is between your chosen minimum and maximum width). This approach has been popularized by tools like [Utopia](https://utopia.fyi/).
2626

2727
Here’s an example of a fluid modular scale for type in action — you can also [explore the live version of this demo](https://color-ig2.begin.app)!
28-
<img alt='Animation loop showing a browser window shrink and growing in width, with a typographic scale shrinking and growing in tandem' src='/_public/img/gif/example-fluid-type.gif' class='m-auto mt0 mb0' />
28+
<img alt='Animation loop showing a browser window shrink and growing in width, with a typographic scale shrinking and growing in tandem' src='/_public/img/gif/example-fluid-type.gif' class='mi-auto mb0' />
2929

3030
In addition to gracefully scaling across a range of viewport widths, using fluid type and spacing can reduce the amount of CSS you need to write (especially when it comes to CSS scoped with media queries). Of course, this strategy requires alignment between designers and developers; [the Utopia blog](https://utopia.fyi/blog) has some great reading on this subject.
3131

app/docs/md/learn/concepts/styling/enhance-styles/utility-classes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ getStyles.path() // root-relative path to the .css file
8686

8787
Though `@enhance/arc-plugin-styles` is already a dependency of Enhance, you may want to declare it as a direct dependency of your project:
8888

89-
<div class="mt-1">
89+
<div class="mbs-1">
9090

9191
```bash
9292
npm i @enhance/arc-plugin-styles

app/docs/md/unsorted/doc-callout-test.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This 👇 code block is rendered and highlighted on the server with arcdown + hl
1212
<doc-callout level="info" mark="🤘">
1313
```
1414

15-
<hr class="block mt3 mb3 border1" />
15+
<hr class="block mb3 border1" />
1616

1717
<doc-callout>
1818

@@ -66,7 +66,7 @@ Luckily Enhance sets you up for success by preconfiguring your app to pass state
6666

6767
</doc-callout>
6868

69-
<hr class="block mt3 mb3 border1" />
69+
<hr class="block mb3 border1" />
7070

7171
Empty "mark", set `mark="none"`.
7272

@@ -76,7 +76,7 @@ Not all things need emoji. Most things do, but not all.
7676

7777
</doc-callout>
7878

79-
<hr class="block mt3 mb3 border1" />
79+
<hr class="block mb3 border1" />
8080

8181
Callouts can be "thin", too. Add an empty `thin` attribute.
8282

@@ -86,7 +86,7 @@ This style is good for one-liners
8686

8787
</doc-callout>
8888

89-
<hr class="block mt3 mb3 border1" />
89+
<hr class="block mb3 border1" />
9090

9191
## `<doc-link-callout>` Test
9292

app/elements/base-test.mjs

-35
This file was deleted.

app/elements/code-editor.mjs

-163
This file was deleted.

app/elements/coming-soon-page.mjs

-26
This file was deleted.

app/elements/content-container.mjs

-21
This file was deleted.

app/elements/doc/callout.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export default function Callout({ html, state }) {
5353
${thin ? 'callout-thin' : ''}
5454
flex
5555
gap-1
56-
items-center
56+
align-items-center
5757
">
5858
${mark.length > 0 && mark !== 'none'
59-
? `<callout-mark class="text2 self-start">${mark}</callout-mark>`
59+
? `<callout-mark class="text2 align-self-start">${mark}</callout-mark>`
6060
: ''}
6161
<div>
6262
<slot></slot>

app/elements/doc/showcase.mjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function DocShowcase({ html, state }) {
99
} = attrs
1010

1111
const contributorMarkup = contributor
12-
? `<p class="mt0">Contributed by: <a class="underline" href="${contributorUrl}">${contributor}</a></p>`
12+
? `<p class="mbs0">Contributed by: <a class="underline" href="${contributorUrl}">${contributor}</a></p>`
1313
: ''
1414

1515
return html`
@@ -37,12 +37,12 @@ export default function DocShowcase({ html, state }) {
3737
color: inherit;
3838
}
3939
</style>
40-
<article class="mt0 mb2 p0 p2-lg">
40+
<article class="mbs0 mbe2 p0 p2-lg">
4141
<a href="${url}" target="_blank">
42-
<figure class="mb1">
42+
<figure class="mbe1">
4343
<img src="${image}" alt="" />
4444
</figure>
45-
<h1 class="font-medium mb0">${title}</h1>
45+
<h1 class="font-medium mbe0">${title}</h1>
4646
<p class="leading3">
4747
<slot></slot>
4848
</p>

0 commit comments

Comments
 (0)