Skip to content

Commit

Permalink
fix: overwrite tailwind typography css for checkbox in ul and ol
Browse files Browse the repository at this point in the history
  • Loading branch information
tomowang committed Dec 29, 2023
1 parent 2c1df55 commit 7403f29
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
16 changes: 16 additions & 0 deletions assets/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,22 @@ video {
content: none;
}

.prose-quoteless :where(.prose-quoteless > ul > li > input:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top: 0;
}

.prose-quoteless :where(.prose-quoteless > ul > li > input:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-bottom: 0;
}

.prose-quoteless :where(.prose-quoteless > ol > li > input:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top: 0;
}

.prose-quoteless :where(.prose-quoteless > ol > li > input:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-bottom: 0;
}

.sr-only {
position: absolute;
width: 1px;
Expand Down
6 changes: 6 additions & 0 deletions exampleSite/content/post/markdown-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-
* Milk
* Cheese

### List with checkbox

- [x] Create a Hugo site
- [x] Add content
- [ ] Add a style

## Other Elements — abbr, sub, sup, kbd, mark

<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
Expand Down
12 changes: 12 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ module.exports = {
'blockquote p:first-of-type::after': { content: 'none' },
'code::before': { content: 'none' },
'code::after': { content: 'none' },
'> ul > li > input:first-child': {
marginTop: 0,
},
'> ul > li > input:last-child': {
marginBottom: 0,
},
'> ol > li > input:first-child': {
marginTop: 0,
},
'> ol > li > input:last-child': {
marginBottom: 0,
},
},
},
},
Expand Down

0 comments on commit 7403f29

Please sign in to comment.