Skip to content

Commit

Permalink
Merge pull request #96 from perimetre/9.2.4
Browse files Browse the repository at this point in the history
9.2.4
  • Loading branch information
adarleyjrr authored Jan 5, 2023
2 parents 1cdfcc2 + 2793334 commit effede0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [9.2.4] 2023-01-04

### Fixed

- Fixed a bug that would cause `WYSIWYGInput` component to incorrectly render nested ordered/unordered lists
- Tweaked default list style classes from `draft-js` to conform with list styles from class `pui-prose`

## [9.2.3] 2022-12-15

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@perimetre/ui",
"description": "A component library made by @perimetre",
"version": "9.2.3",
"version": "9.2.4",
"repository": {
"type": "git",
"url": "git+https://github.com/perimetre/ui.git"
Expand Down
21 changes: 14 additions & 7 deletions src/components/WYSIWYGInput/draft.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This the `draft-js/dist/Draft.css` file With the list part commented out.
This the `draft-js/dist/Draft.css` file, but with the lists part tweaked to conform with our "prose" classes for lists.
Because it's too opinionated and conflicts with tailwind's "prose".
Ref: https://github.com/facebook/draft-js/blob/master/src/component/utils/DraftStyleDefault.css, https://draftjs.org/docs/advanced-topics-issues-and-pitfalls/#missing-draftcss
*/
Expand Down Expand Up @@ -98,7 +98,7 @@
text-align: right;
}

/* .public-DraftStyleDefault-listLTR {
.public-DraftStyleDefault-listLTR {
direction: ltr;
}

Expand All @@ -108,7 +108,7 @@

.public-DraftStyleDefault-ol, .public-DraftStyleDefault-ul {
margin: 16px 0;
padding: 0;
padding: 0 !important;
}

.public-DraftStyleDefault-depth0 {
Expand Down Expand Up @@ -183,38 +183,45 @@
position: absolute;
text-align: right;
width: 30px;
font-weight: initial;
}

&.public-DraftStyleDefault-listRTL:before {
position: absolute;
right: -36px;
text-align: left;
width: 30px;
font-weight: initial;
}

&:before {
content: counter(ol0) ". ";
counter-increment: ol0;
font-weight: initial;
}

&.public-DraftStyleDefault-depth1:before {
content: counter(ol1, lower-alpha) ". ";
content: counter(ol1, initial) ". ";
counter-increment: ol1;
font-weight: initial;
}

&.public-DraftStyleDefault-depth2:before {
content: counter(ol2, lower-roman) ". ";
content: counter(ol2, initial) ". ";
counter-increment: ol2;
font-weight: initial;
}

&.public-DraftStyleDefault-depth3:before {
content: counter(ol3) ". ";
counter-increment: ol3;
font-weight: initial;
}

&.public-DraftStyleDefault-depth4:before {
content: counter(ol4, lower-alpha) ". ";
content: counter(ol4, initial) ". ";
counter-increment: ol4;
font-weight: initial;
}
}

Expand All @@ -237,4 +244,4 @@
.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset {
counter-reset: ol4;
}
*/

0 comments on commit effede0

Please sign in to comment.