From 979c78fa6f146efb20c028ccd26c7e9059af7776 Mon Sep 17 00:00:00 2001
From: Adam Johnson
Date: Fri, 10 Jan 2025 11:19:38 -0500
Subject: [PATCH 1/5] fix(blockquote): fix center alignment, enforce blockquote
font size and update Style docs (#2112)
* fix(blockquote): override potential `max-width` for quote content
* chore(blockquote): add changeset
* fix(blockquote): use logical properties
* fix(blockquote): update quote and author spacing
* docs(blockquote): update maximum width size
With direction from Marionne
* feat(blockquote): limit width to 752px per docs
* docs(blockquote): remove "Image of" at start of alt text
* docs(blockquote): remove a11y note about `aria-label`
* fix(blockquote): use standard media query size
* docs(blockquote): re-add content to sizes table
* docs(blockquote): fix and update themable tokens link on Style page
* fix(blockquote): increase/correct slotted content `font-size`
* fix(blockquote): use tag selector in CSS for quote
* fix(blockquote): target `p` tag for blockquote specifically
* fix(blockquote): use standard media query size
* chore(blockquote): upgrade changeset to minor
---
.changeset/thick-flowers-beam.md | 5 ++
elements/rh-blockquote/docs/00-overview.md | 3 +-
elements/rh-blockquote/docs/10-style.md | 40 ++++++------
elements/rh-blockquote/docs/20-guidelines.md | 64 +++++++++----------
.../rh-blockquote/docs/40-accessibility.md | 1 -
elements/rh-blockquote/rh-blockquote.css | 32 +++++++---
6 files changed, 82 insertions(+), 63 deletions(-)
create mode 100644 .changeset/thick-flowers-beam.md
diff --git a/.changeset/thick-flowers-beam.md b/.changeset/thick-flowers-beam.md
new file mode 100644
index 0000000000..0284c9481d
--- /dev/null
+++ b/.changeset/thick-flowers-beam.md
@@ -0,0 +1,5 @@
+---
+"@rhds/elements": minor
+---
+
+``: fix center alignment, blockquote font size and update Style docs
diff --git a/elements/rh-blockquote/docs/00-overview.md b/elements/rh-blockquote/docs/00-overview.md
index f5dc19b5cb..33f2ce6110 100644
--- a/elements/rh-blockquote/docs/00-overview.md
+++ b/elements/rh-blockquote/docs/00-overview.md
@@ -5,6 +5,5 @@
- When you need to break up large portions of text
- Image of a blockquote including a quote icon, quotation text, and citation
- text
+ A blockquote including a quote icon, quotation text, and citation text
diff --git a/elements/rh-blockquote/docs/10-style.md b/elements/rh-blockquote/docs/10-style.md
index 8c25141e9f..2a199a5207 100644
--- a/elements/rh-blockquote/docs/10-style.md
+++ b/elements/rh-blockquote/docs/10-style.md
@@ -31,7 +31,7 @@ also include the following optional elements:
## Sizes
-
@@ -39,21 +39,21 @@ also include the following optional elements:
-| Size | Element | Current value |
-|-------------------|-----------------------|---------------|
-| Default | Text size - quotation | 20px, 1.25rem |
-| Default | 30 (1.5) | |
-| Large | 28px, 1.75rem | |
-| Large | 36.4 (1.3) | |
-| Default and Large | 14px, 0.875rem | |
-| Default and Large | 21 (1.5) | |
+| Size | Element | Current value |
+|-------------------|-------------------------|----------------|
+| Default | Text size - quotation | 20px, 1.25rem |
+| Default | Line height - quotation | 30 (1.5) |
+| Large | Text size - quotation | 28px, 1.75rem |
+| Large | Line height - quotation | 36.4 (1.3) |
+| Default and Large | Text size - citation | 14px, 0.875rem |
+| Default and Large | Line height - citation | 21 (1.5) |
## Theme
A blockquote is available on both light and dark backgrounds, and uses [themable
-tokens][/theming/color-palettes] to respond to it's color context.
+tokens](/theming/customizing/) to respond to it's color context.
@@ -68,7 +68,7 @@ tokens][/theming/color-palettes] to respond to it's color context.
### Light theme
-
@@ -77,7 +77,7 @@ tokens][/theming/color-palettes] to respond to it's color context.
### Dark theme
-
@@ -86,14 +86,14 @@ tokens][/theming/color-palettes] to respond to it's color context.
### Emphasis border
-
-
@@ -111,14 +111,14 @@ tokens][/theming/color-palettes] to respond to it's color context.
### Title and heading text
-
-
@@ -138,7 +138,7 @@ tokens][/theming/color-palettes] to respond to it's color context.
The base elements in both sizes are stacked and left aligned by default, but they can be vertically centered if necessary.
-
@@ -150,7 +150,7 @@ A blockquote was designed to be read from top to bottom. If certain optional ele
-
@@ -172,7 +172,7 @@ Citation text has specific styles applied to it.
@@ -194,7 +194,7 @@ Space values are the same in both sizes and on all breakpoints.
diff --git a/elements/rh-blockquote/docs/20-guidelines.md b/elements/rh-blockquote/docs/20-guidelines.md
index c76d9235f5..084686615d 100644
--- a/elements/rh-blockquote/docs/20-guidelines.md
+++ b/elements/rh-blockquote/docs/20-guidelines.md
@@ -8,7 +8,7 @@ Use the Default size for larger amounts of text and the Large size for smaller a
@@ -23,7 +23,7 @@ Both blockquote sizes can be left or center aligned.
@@ -35,14 +35,14 @@ A variety of extras including an emphasis border, logo, and text styles may be a
@@ -51,14 +51,14 @@ A variety of extras including an emphasis border, logo, and text styles may be a
@@ -70,14 +70,14 @@ Other elements including a video or card may also be added to a blockquote. They
@@ -91,14 +91,14 @@ A minimum width is hard to determine because a blockquote can be placed in a var
@@ -106,18 +106,18 @@ A minimum width is hard to determine because a blockquote can be placed in a var
### Maximum width
-The maximum width of a blockquote anywhere is 750px to avoid reader fatigue.
+The maximum width of a blockquote anywhere is 752px to avoid reader fatigue.
@@ -127,7 +127,7 @@ The maximum width of a blockquote anywhere is 750px to avoid reader
A Default size blockquote can be placed in a card if the text is short enough. Otherwise, keep blockquotes with lots of text in the page layout to avoid readability issues. A blockquote will get taller as containers and breakpoints get smaller, so take that into consideration as well.
-
+
@@ -142,14 +142,14 @@ When other elements are used with blockquotes, they are placed on the right. Som
@@ -161,28 +161,28 @@ As breakpoints get smaller, blockquote text sizes will be reduced based on the m
@@ -192,28 +192,28 @@ As breakpoints get smaller, blockquote text sizes will be reduced based on the m
@@ -222,28 +222,28 @@ As breakpoints get smaller, blockquote text sizes will be reduced based on the m
@@ -257,7 +257,7 @@ The quote icon and citation text must always be included.
@@ -268,7 +268,7 @@ Blockquotes that are too thin are sometimes hard to read.
@@ -279,7 +279,7 @@ Do not add an emphasis border to a centered blockquote.
@@ -289,7 +289,7 @@ Do not place any elements near centered blockquotes.
diff --git a/elements/rh-blockquote/docs/40-accessibility.md b/elements/rh-blockquote/docs/40-accessibility.md
index f4fc5b7442..6559f7682b 100644
--- a/elements/rh-blockquote/docs/40-accessibility.md
+++ b/elements/rh-blockquote/docs/40-accessibility.md
@@ -1,6 +1,5 @@
## Implementation
-- To provide context, include an aria-label attribute in the markup
- Ensure the blockquote is not interactive and cannot receive focus (unless there are interactive elements)
- Ensure that surrounding content can convey the purpose of a blockquote via assistive technologies
- Using a blockquote for anything other than its intended purpose will be confusing for assistive technologies
diff --git a/elements/rh-blockquote/rh-blockquote.css b/elements/rh-blockquote/rh-blockquote.css
index 7a93352e12..9846a2388d 100644
--- a/elements/rh-blockquote/rh-blockquote.css
+++ b/elements/rh-blockquote/rh-blockquote.css
@@ -1,14 +1,14 @@
:host {
color: var(--rh-color-text-primary);
margin: 0 auto;
- text-align: left;
+ text-align: start;
font-size: var(--rh-font-size-body-text-lg, 1.125rem);
font-family: var(--rh-font-family-heading, RedHatDisplay, 'Red Hat Display', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Malayalam', 'Noto Sans SC', 'Noto Sans TC', 'Noto Sans Thai', Helvetica, Arial, sans-serif);
line-height: var(--rh-line-height-body-text, 1.5);
font-weight: var(--rh-font-weight-heading-regular, 300);
}
-@media (min-width: 700px) {
+@media (min-width: 768px) {
:host {
font-size: var(--rh-font-size-body-text-xl, 1.25rem);
}
@@ -19,8 +19,15 @@ blockquote {
margin: 0;
}
+figure {
+ display: block;
+ max-inline-size: 752px;
+}
+
blockquote ::slotted(p) {
- margin: var(--rh-length-lg, 16px) 0;
+ font-size: var(--rh-font-size-body-text-xl, 1.25rem) !important;
+ margin: 0;
+ margin-block-end: var(--rh-length-lg, 16px);
}
figcaption {
@@ -35,6 +42,7 @@ figcaption p {
#author {
font-weight: var(--rh-font-weight-heading-bold, 700);
+ margin-block-start: var(--rh-space-lg, 16px);
}
rh-icon {
@@ -45,14 +53,22 @@ rh-icon {
text-align: center;
}
-:host([size='large']) {
- font-size: var(--rh-font-size-body-text-2xl, 1.5rem);
+:host([align='center']) figure {
+ margin-inline: auto;
+}
+
+:host([align='center']) blockquote ::slotted(p) {
+ max-inline-size: none !important;
+}
+
+:host([size='large']) blockquote ::slotted(p) {
+ font-size: var(--rh-font-size-body-text-2xl, 1.5rem) !important;
line-height: var(--rh-line-height-heading, 1.3);
}
-@media (min-width: 700px) {
- :host([size='large']) {
- font-size: var(--rh-font-size-heading-md, 1.75rem);
+@media (min-width: 768px) {
+ :host([size='large']) blockquote ::slotted(p) {
+ font-size: var(--rh-font-size-heading-md, 1.75rem) !important;
}
}
From 34b872602913de8abd5c2ea6426154bb9b49427b Mon Sep 17 00:00:00 2001
From: Adam Johnson
Date: Tue, 28 Jan 2025 10:13:03 -0500
Subject: [PATCH 2/5] fix(pagination): Colors, right to left demo, and logical
properties (#2116)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(pagination): make bg of open variants transparent
* fix(pagination): fallback colors for public and private variables
* fix(pagination): use logical properties
* fix(pagination): fix RTL demo layout
* fix(pagination): wrap all pagination demos with ``
* fix(pagination): remove fallbacks to RHDS color tokens
* chore(pagination): add changeset
* docs(pagination): add docs about colors + surface
* chore(pagination): downgrade changeset to patch
Co-authored-by: Benny Powers - עם ישראל חי!
* docs(pagination): update changeset description
Co-authored-by: Benny Powers - עם ישראל חי!
* docs(pagination): reword `rh-surface` requirement terminology, add alert note
* docs(pagination): update 30-code.md
---------
Co-authored-by: Benny Powers - עם ישראל חי!
---
.changeset/dry-icons-love.md | 5 ++
elements/rh-pagination/demo/compact.html | 5 +-
elements/rh-pagination/demo/many-pages.html | 51 ++++++++++---------
.../demo/no-numeric-control.html | 21 ++++----
.../rh-pagination/demo/open-compact-size.html | 5 +-
elements/rh-pagination/demo/open-compact.html | 5 +-
elements/rh-pagination/demo/open.html | 21 ++++----
elements/rh-pagination/demo/overflow.html | 21 ++++----
.../rh-pagination/demo/rh-pagination.html | 21 ++++----
.../rh-pagination/demo/right-to-left.html | 16 ++----
elements/rh-pagination/demo/size-compact.html | 5 +-
elements/rh-pagination/demo/size.html | 21 ++++----
elements/rh-pagination/docs/30-code.md | 10 ++++
.../rh-pagination/rh-pagination-lightdom.css | 19 ++++---
elements/rh-pagination/rh-pagination.css | 38 +++++++-------
15 files changed, 145 insertions(+), 119 deletions(-)
create mode 100644 .changeset/dry-icons-love.md
create mode 100644 elements/rh-pagination/docs/30-code.md
diff --git a/.changeset/dry-icons-love.md b/.changeset/dry-icons-love.md
new file mode 100644
index 0000000000..b2aa525fc9
--- /dev/null
+++ b/.changeset/dry-icons-love.md
@@ -0,0 +1,5 @@
+---
+"@rhds/elements": patch
+---
+
+``: improves layouts for non-left-to-right languages
diff --git a/elements/rh-pagination/demo/compact.html b/elements/rh-pagination/demo/compact.html
index 518933b26b..ba751c92ad 100644
--- a/elements/rh-pagination/demo/compact.html
+++ b/elements/rh-pagination/demo/compact.html
@@ -1,4 +1,4 @@
-
Paginators with 5 or fewer pages should not overflow, meaning all links should be visible.
Once a paginator has more than 5 pages, then it must overflow, meaning some links will be hidden.
@@ -43,6 +45,7 @@
diff --git a/elements/rh-pagination/demo/right-to-left.html b/elements/rh-pagination/demo/right-to-left.html
index 8b8ad08748..5b42961f58 100644
--- a/elements/rh-pagination/demo/right-to-left.html
+++ b/elements/rh-pagination/demo/right-to-left.html
@@ -1,4 +1,4 @@
-
+
+
+
diff --git a/elements/rh-pagination/docs/30-code.md b/elements/rh-pagination/docs/30-code.md
new file mode 100644
index 0000000000..268a0f9dcd
--- /dev/null
+++ b/elements/rh-pagination/docs/30-code.md
@@ -0,0 +1,10 @@
+### Displaying correct pagination colors
+
+In order for pagination to be styled correctly, each `` must be wrapped in a container element which supports the `color-palette` attribute, such as the [`` element](/elements/surface).
+
+
+