Skip to content

Commit

Permalink
chore(design system): Fix block editor and dotai font sizes inconsist…
Browse files Browse the repository at this point in the history
…encies #28724 (#29684)

### Proposed Changes
* Replace `font-size: $dot-editor-size` with `font-size: $font-size-md`.
* Remove font-size definitions for `textarea`, `select`, `button`, and
`input` elements in `dotai.css`, allowing them to inherit font-size from
`dotcms.css`.

### Additional Information
Adjustments to font-size within ProseMirror will be handled in a
separate ticket if needed.
### Screenshots
Original (words counter and reading time)            |  Updated
:-------------------------:|:-------------------------:

![image](https://github.com/user-attachments/assets/20c9362a-13ad-4f80-9238-bcc4912936a1)|![image](https://github.com/user-attachments/assets/b0e864d6-72b6-47b6-9545-badb2b5741e7)
Original (dotai)            |  Updated

![image](https://github.com/user-attachments/assets/cbcce6fe-8210-4596-9556-243372b343a0)|![image](https://github.com/user-attachments/assets/596a7a7e-7c2e-4743-916d-c028d02bcfa2)

This PR fixes #28724
  • Loading branch information
valentinogiardino authored Aug 21, 2024
1 parent 386274d commit 42f5c51
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: $color-palette-gray-500;
margin-top: 1rem;
gap: 0.65rem;
font-size: $dot-editor-size;
font-size: $font-size-md;

.error-message {
color: $error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.url-container {
cursor: pointer;
white-space: nowrap;
font-size: $dot-editor-size;
font-size: $font-size-md;
width: 100%;
word-wrap: normal;
display: flex;
Expand All @@ -52,7 +52,7 @@
display: flex;
gap: 0.2 * $dot-editor-size;
min-width: 100%;
font-size: $dot-editor-size;
font-size: $font-size-md;

.checkbox-container {
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

h3 {
text-transform: uppercase;
font-size: $dot-editor-size;
font-size: $font-size-md;
margin: (0.5 * $dot-editor-size) $dot-editor-size;
color: #999999;
}
Expand Down
1 change: 1 addition & 0 deletions core-web/libs/dotcms-scss/jsp/scss/dotcms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ legend,
input,
button,
textarea,
select,
p,
blockquote,
th,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
.p-card-title {
flex-grow: 1;
h2 {
font-size: $dot-editor-size;
font-size: $font-size-md;
line-height: 140%;
margin: 0;
overflow: hidden;
Expand Down
11 changes: 6 additions & 5 deletions dotCMS/src/main/webapp/html/css/dijit-dotcms/dotcms.css
Original file line number Diff line number Diff line change
Expand Up @@ -3844,7 +3844,7 @@
color: #ffffff;
line-height: 2.5rem;
margin: 0;
font-size: 1.25rem;
font-size: 1rem;
}
.dijitDropDownActionButton .dijitButtonNode {
height: 2.5rem;
Expand Down Expand Up @@ -8829,7 +8829,7 @@ Styles for commons fields along the backend

.lineDividerTitle {
color: #6c7389;
font-size: 1.5rem;
font-size: 1.25rem;
border-bottom: 1px solid #d1d4db;
padding-bottom: 1rem;
margin: 3rem 0 1.5rem;
Expand Down Expand Up @@ -9358,7 +9358,7 @@ dd .buttonCaption {
}
.calendar-events .portlet-toolbar__info {
flex: 1 0 auto;
font-size: 1.25rem;
font-size: 1rem;
justify-content: center;
}

Expand Down Expand Up @@ -10141,7 +10141,7 @@ a.category_higlighted, a.tag_higlighted {

.nameText {
align-self: center;
font-size: 1.25rem;
font-size: 1rem;
font-weight: normal;
}

Expand Down Expand Up @@ -10259,7 +10259,7 @@ a.category_higlighted, a.tag_higlighted {
}

.fullUserName {
font-size: 1.25rem;
font-size: 1rem;
font-weight: bold;
margin-bottom: 0.5rem;
padding-bottom: 0;
Expand Down Expand Up @@ -11234,6 +11234,7 @@ legend,
input,
button,
textarea,
select,
p,
blockquote,
th,
Expand Down
5 changes: 0 additions & 5 deletions dotCMS/src/main/webapp/html/portlet/ext/dotai/dotai.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@


input[type="text"] {
font-size: 1rem;
padding: 10px;
margin-top: -10px;
border-color: var(--color-palette-primary-op-20);
Expand All @@ -298,7 +297,6 @@ input[type="text"]:focus {
}

input[type="number"] {
font-size: 1rem;
padding: 10px;
min-width: 100px;
margin-top: -10px;
Expand Down Expand Up @@ -337,7 +335,6 @@ input[type="radio"]:hover {
}

textarea {
font-size: 1rem;
padding: 10px;
margin-top: -10px;
border-color: var(--color-palette-primary-op-20);
Expand All @@ -353,7 +350,6 @@ textarea:focus {
}

select {
font-size: 1rem;
padding: 10px;
margin-top: -10px;
border-color: var(--color-palette-primary-op-20);
Expand All @@ -370,7 +366,6 @@ select:focus {
}

.button {
font-size: 1rem;
padding: 20px 40px;
border: 1px solid #9D9D9D;
border-radius: .25em;
Expand Down

0 comments on commit 42f5c51

Please sign in to comment.