Skip to content

Commit

Permalink
fix(site): postcss fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Sep 26, 2023
1 parent 4fa1941 commit 149aadf
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
1 change: 1 addition & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"eslint-plugin-svelte": "^2.30.0",
"mdsvex": "^0.11.0",
"postcss": "^8.4.30",
"postcss-load-config": "^4.0.1",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
Expand Down
8 changes: 4 additions & 4 deletions site/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tailwind from 'tailwindcss'
import tailwindConfig from './tailwind.config.js'
import autoprefixer from 'autoprefixer'
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
plugins: [tailwind(tailwindConfig),autoprefixer]
}
13 changes: 0 additions & 13 deletions site/src/mdsvex/BlogLayout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,5 @@
<span class="font-mono mb-2 mt-1 sm:text-lg"
>{date} - <a class="text-accent" href={`https://x.com/${author}`}>{author}</a></span
>

<slot />
</main>

<!--
<style lang="postcss">
:global(.blog-post-container > p) {
@apply sm:text-xl mb-4;
}
:global(.blog-post-container > h2) {
@apply sm:text-3xl sm:mt-4 mb-0 font-semibold mb-4;
}
</style>
!-->
14 changes: 14 additions & 0 deletions site/src/routes/blog/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<slot />

<!-- this is actually a layout for the blog posts !-->

<style lang="postcss">
/* \u003A is a colon */
:global(.blog-post-container > p) {
@apply sm:text-xl mb-4;
}
:global(.blog-post-container > h2) {
@apply sm:text-3xl sm:mt-4 mb-0 font-semibold mb-4;
}
</style>
4 changes: 4 additions & 0 deletions site/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { mdsvex } from 'mdsvex';
Expand All @@ -18,6 +19,9 @@ const config = {
}
}),
vitePreprocess(),
preprocess({
postcss: true
})
],

kit: {
Expand Down

0 comments on commit 149aadf

Please sign in to comment.