Skip to content

Commit

Permalink
chore(storefront): move <style> to head
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Mar 5, 2025
1 parent 970c73a commit baffc71
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/storefront/app/(frontpage)/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const metadata = {
]}
/>

<style>
<style href="frontpage" precedence='medium'>
{`
header:first-of-type {
background-color: transparent;
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/app/bloggen/(frontpage)/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const metadata = {
level={2}
/>

<style>
<style href="bloggen" precedence='medium'>
{`
body {
background-color: var(--ds-color-neutral-background-subtle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function PostLayout({
</MdxContent>
</main>
</Container>
<style suppressHydrationWarning>
<style suppressHydrationWarning href='post-layout' precedence='medium'>
{`
header {
[data-color-scheme='dark'] &,
Expand Down
6 changes: 5 additions & 1 deletion apps/storefront/app/komponenter/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export default function page() {
{sortedData.map((component) => (
<ComponentCard key={component.title} {...component} />
))}
<style suppressHydrationWarning>
<style
suppressHydrationWarning
href='components-page'
precedence='medium'
>
{`
body {
background-color: var(--ds-color-neutral-background-subtle);
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/app/monstre/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Alle som ønsker kan påvirke arbeidet gjennom åpne diskusjoner i [Slack](https



<style>
<style href="monstre-page" precedence='medium'>
{`
body {
background-color: var(--ds-color-neutral-background-subtle);
Expand Down
6 changes: 5 additions & 1 deletion apps/storefront/layouts/MenuPageLayout/MenuPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ const MenuPageLayout = ({ content, data, banner }: PageLayoutProps) => {
</div>
</main>
</Container>
<style suppressHydrationWarning>
<style
suppressHydrationWarning
href='menu-page-layout'
precedence='medium'
>
{`
header {
[data-color-scheme='dark'] &,
Expand Down

0 comments on commit baffc71

Please sign in to comment.