Commit Graph
86 Commits
Author SHA1 Message Date
JosiahandGitHub bf98f30311 Clean up extra spread array (#362)
Map [returns a new array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), so we can just use that result directly, instead of spreading it into a new array!
2024-09-20 18:12:43 -04:00
Marc LopezandGitHub e705ae8a0e Fix table text align (#346) 2024-08-07 12:15:31 -04:00
Jordan PittmanandGitHub 0f6d77ccad Don't apply margins to <br> elements contained in an <li> in FF (#350)
* Only fixup margins in `p` tags when inside a list item

The intent of these selectors are to only target `p` tags but we are targeting `*:first-child` and `*:last-child`. This has a side effect of causing `<br>` elements inside the list item to gain a margin _only in Firefox_. Other browsers treat the `<br>` element as properly inline and as such don’t apply margins but FF does not seem to.

* Update changelog
2024-04-24 19:38:06 -04:00
Adam Wathan f0797da28a Align tables to start instead of left
For better RTL support.
2024-03-27 09:55:45 -04:00
omriluzandGitHub 2f9f9561e4 Change CSS properties to their bidirectional counterparts (#323) 2024-03-27 09:55:13 -04:00
fd364bed8f Add prose-kbd element modifier (#340)
* Add `prose-kbd` element modifier
Add selector, update readme and tests.

* Change order of `kbd` modifier

---------

Co-authored-by: Jonathan Reinink <[email protected]>
2024-03-26 08:11:56 -04:00
ArchezandGitHub 2e57a928aa Retain order of video selector with figure (#339) 2024-03-26 07:45:20 -04:00
Jonathan ReininkandGitHub 2e703f424a Add description list (<dl>, <dt>, <dd>) styles (#316)
* Add description list (`<dl>`, `<dt>`, `<dd>`) styles

* Update changelog
2023-09-05 13:56:09 -04:00
Jonathan ReininkandGitHub 6b0b7cd2c2 Add <kbd> styles (#317)
* Add support for the `<kbd>` element

* Make border variable name plural

* Add size-modifier specific padding

* Tweak property order

* Update design

* Tweak padding and font size

* Update changelog
2023-09-01 06:40:20 -04:00
Jonathan ReininkandGitHub 1480cc58c3 Fix prose-invert when used with colors in light mode (#315)
* Fix `prose-invert` when used with colors in light mode

* Update changelog
2023-08-30 16:09:34 -04:00
Jonathan ReininkandGitHub cf4a00a6a5 Add <picture> styles (#314)
* Add `<picture>` styles

* Update changelog
2023-08-30 15:00:24 -04:00
1092a85849 Remove typography styles from not-prose elements in addition to their children (#301)
* Ignore not-prose also on the element itself

* Update tests

* Update changelog

---------

Co-authored-by: Jonathan Reinink <[email protected]>
2023-08-30 13:49:28 -04:00
Jonathan ReininkandGitHub 6cd359366d Fix space between <figcaption> and <pre> (#313)
* Fix space between `<figcaption>` and `<pre>`

* Update changelog
2023-08-30 11:38:47 -04:00
Brad CornesandGitHub 078386e63d Ensure p styles are inserted before .lead styles (#294) 2023-01-10 16:11:12 +00:00
Brad CornesandGitHub aea7b4699a Fix selector when using a non-default class (#289) 2022-11-07 16:01:37 +00:00
Brad Cornes 436afab055 Bump tailwindcss to 3.2.2 2022-11-07 15:49:47 +00:00
Brad CornesandGitHub 3da9635b96 Update TypeScript types (#284)
* Update TypeScript types

* Update changelog
2022-09-02 12:59:05 +01:00
Jordan PittmanandGitHub ce90bc9d11 Add typescript types (#283) 2022-09-01 13:45:16 -04:00
Jordan PittmanandGitHub 3bdcbe62c5 Move common, trailing pseudo elements when generating selectors (#281)
* Move common, trailing pseudo elements when generating selectors

* Fix CS

* Update dependencies

* Update lockfile
2022-08-17 13:41:30 -04:00
Jonathan ReininkandGitHub 82c4562e08 Update strong and code colors to inherit from parent (#276) 2022-07-12 12:00:08 -04:00
b31aca7626 Add h5 and h6 options to plugin (#273)
* Update index.js

Add h5 and h6 tag to index.js

* Update index.js

* Add test

* Update changelog

Co-authored-by: Jordan Pittman <[email protected]>
2022-07-04 16:49:27 -04:00
Brad CornesandGitHub 98e4b10006 Fix child combinator :where selectors (#268) 2022-06-16 14:01:28 +01:00
Brad CornesandGitHub 00f32db71a Fix figure spacing (#267) 2022-05-25 12:49:05 +01:00
Jordan PittmanandGitHub 22b2e9ed17 Fix generation of prose-headings variant (#264)
* Fix prose-headings variant

* Update changelog
2022-04-13 10:30:48 -04:00
Jordan PittmanandGitHub e49acfe9d7 Allow lead class to override element styles (#260)
* Allow lead to override element styles

* Update changelog
2022-03-25 14:36:17 -04:00
6464c01676 Fix prose elements legacy mode. Fixes #258 (#259)
* Fix prose elements `legacy` mode. Fixes #258

* Add test

* Fix legacy mode custom element selectors

Co-authored-by: Jordan Pittman <[email protected]>
2022-03-25 13:45:46 -04:00
Daniel Perez AlvarezandGitHub 51e1fec3a1 Style tfoot (#243)
* Style `tfoot td` same as `tbody td`

**Problem**

If you've got a CMS that generates a `tfoot` tag for table footers, the `td`s contained in it are not aligned with the `td`s in `tbody`.

**Solution**

Style `tfoot td` the same as `tbody td`.

* Add border to `tfoot`

* Update `tfoot` styles for all sizes
2022-03-01 09:00:31 -05:00
Daniel Perez AlvarezandGitHub 3d1ae3957b Fix duplicate keys issue with ol and ul (#251)
Fixes #250
2022-02-24 11:29:45 +01:00
a5c6625566 Improve tests for Tailwind CSS v3 (#252)
* Adjust tailwind.config.js to match v3 (drop purge: entry)

* Adjust tests to tw3 non-alpha output

* run prettier on test file

* rename `twVariables` to `defaults`

This is more inline with what we do in the tailwindcss codebase itself

* embed the `${defaults}` directly

Co-authored-by: Ingo Struck (git commits) <[email protected]>
2022-02-22 11:28:23 +01:00
Robin MalfaitandGitHub 1c7a09cc04 Ensure nested selectors using &:hover work (#246)
* ensure nested selectors using `&:hover` work

* update changelog
2022-02-14 16:22:50 +01:00
Robin MalfaitandGitHub 575c7226d4 Remove dist folder and related dependencies (#226)
* remove dist folder and related dependencies

* run all tests

* update chagelog
2021-12-15 16:05:56 +01:00
Jordan PittmanandGitHub 000b671702 Don't generate invalid CSS when given an array of property values (#224) 2021-12-10 14:19:50 -05:00
2d25ef39f6 Improve customizability and v3 color support (#216)
* Start scaffolding out components/modifiers

* WIP

* Updated pre-code and pre-bg colors

* WIP

* Add some notes

* WIP

* handle nested objects, e.g.: `@media`

* WIP

* simplify invert mode

* simplify base styles

* add `prose-XXX` variants

* update demo pages

* bump tailwind version

* mark insiders as a valid peer dependency

* bump next

* use package-lock.json file

* cleanup

* add more variants

* rename `rules` to `hr`

* update test snapshots

We probably want to look at other testing mechanisms here.

* cleanup index file

* improve API

* Simplify variants, add more element variants

* Refactor to use ::marker

* Tweak marker positions to work better across multiple browsers

* Simplify testing strategy

Co-authored-by: sschoger <[email protected]>
Co-authored-by: Robin Malfait <[email protected]>
2021-11-07 10:45:07 -05:00
Adam WathanandGitHub 8d00475c26 Fix child combinators in :where (#210) 2021-10-02 20:27:27 -04:00
Adam WathanandGitHub 927902e8f5 Use attribute selector for not-prose to avoid over-generating CSS (#208) 2021-10-01 11:47:34 -04:00
Adam WathanandGitHub fd70fe0b4e Reference colors from tailwindcss/colors instead of defaultTheme (#206)
* Reference colors from tailwindcss/colors instead of defaultTheme

* Update tests
2021-09-30 05:54:24 -04:00
75bbcc04be Support "undoing" prose styles (#205)
* Add `.not-prose` class

* Respect `className` option when adding `not-prose` to selectors

Co-authored-by: Jonathan Reinink <[email protected]>
Co-authored-by: Mathieu TUDISCO <[email protected]>
2021-09-30 04:38:49 -04:00
156fe00917 Use :where to reduce specificity (#203)
* Use :where to reduce specificity

* Update index.js

* Handle before/after with :where

This is a fairly naive solution and could/should be made more robust to handle other pseudo-elements like ::first-letter, ::first-line, etc. but I'm inclined to just roll with this until someone actually opens an issue because they needed support for those.

* Only wrap selectors with :where(), not property names

* Add new `target` plugin option to enable/disable the use of `:where()` selectors

Co-Authored-By: Adam Wathan <[email protected]>
Co-authored-by: Jonathan Reinink <[email protected]>
2021-09-29 11:32:48 -04:00
Adam WathanandGitHub 2e006e1e87 Add strong styles for headings (#180) 2021-05-29 16:05:06 -04:00
Peter NeupauerandGitHub 8a9055cf97 Fix ordered list style type s modifier position (#137)
Signed-off-by: Peter Neupauer <[email protected]>
2021-02-12 16:13:56 +01:00
a5e0b2d1ee keep type on ol elements in mind (#126)
Closes: #72
Closes: #70

Co-authored-by: Peter Neupauer <[email protected]>

Co-authored-by: Peter Neupauer <[email protected]>
2021-01-08 18:07:06 +01:00
Robin Malfait 0a68d1ac66 use content:''; for ul/li
*oops*
2021-01-08 17:42:17 +01:00
Robin MalfaitandGitHub e8c3fe7b61 use content: none; instead of content: ''; (#125)
* use `content: none;` instead of `content: '';`

Closes: #41
Closes: #77

* bump dependencies
2021-01-08 13:59:57 +01:00
Robin Malfait 1bb719671d add lodash.isplainobject as dedicated dependency 2020-12-15 15:36:09 +01:00
614397c0a7 use explicit lodash dependencies (#111)
Fixes: #84
Fixes: #39
Closes: #65

Co-authored-by: Brad Cornes <[email protected]>
Co-authored-by: Jean-Luc Geering <[email protected]>

Co-authored-by: Brad Cornes <[email protected]>
Co-authored-by: Jean-Luc Geering <[email protected]>
2020-12-15 14:59:35 +01:00
d8e1dc6e0e Use implicit list-item counter (#110)
* Use the implicit `list-item` counter

Signed-off-by: Peter Neupauer <[email protected]>

* update tests

Co-authored-by: Peter Neupauer <[email protected]>
2020-12-14 18:21:42 +01:00
Beau SimensenandGitHub 2291aca9c0 Fix bug related to prose color helpers not working as expected (#107) 2020-12-14 17:28:35 +01:00
Adam Wathan fa5c28c982 Read colors from config, fallback to default config 2020-11-12 10:49:00 -05:00
Adam Wathan df039495ae Update Tailwind version 2020-11-12 10:30:03 -05:00
Adam Wathan 2be004c402 Support safelisting default modifiers 2020-11-12 10:22:54 -05:00