Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/typography/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const _generateBodySmallStyles = (selector, includeSkeleton = true) => {
}` : unsafeCSS('');
return css`
${selector} {
--d2l-overflow-clip-margin: 0.1em;
color: var(--d2l-theme-text-color-static-subtle);
font-size: 0.7rem;
font-weight: 400;
Expand Down Expand Up @@ -186,6 +187,7 @@ export const _generateHeading1Styles = (selector, includeFocus = false) => {
${focusStyles}
@media (max-width: 615px) {
${selector} {
--d2l-overflow-clip-margin: 0.15em;
font-size: 1.5rem;
line-height: 1.8rem;
}
Expand Down Expand Up @@ -224,6 +226,7 @@ export const _generateHeading2Styles = (selector, includeFocus = false) => {
selector = unsafeCSS(selector);
return css`
${selector} {
--d2l-overflow-clip-margin: 0.15em;
font-size: 1.5rem;
font-weight: 400;
line-height: 1.8rem;
Expand Down Expand Up @@ -352,6 +355,7 @@ export const _generateLabelStyles = (selector, includeSkeleton = true) => {
` : unsafeCSS('');
return css`
${selector} {
--d2l-overflow-clip-margin: 0.1em;
font-size: 0.7rem;
font-weight: 700;
letter-spacing: 0.2px;
Expand Down
2 changes: 1 addition & 1 deletion helpers/overflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getOverflowDeclarations({ textOverflow = '', lines = 0, lit = tr
${lines
? set`
display: -webkit-box;
overflow-clip-margin: 0.2em;
overflow-clip-margin: var(--d2l-overflow-clip-margin, 0.2em);
overflow-wrap: anywhere;
overflow-y: clip;
text-overflow: ${textOverflow || 'ellipsis'};
Expand Down
2 changes: 1 addition & 1 deletion helpers/test/overflow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('overflow', () => {
min-width: 0; /* clamps width of flex items */
overflow-x: clip;
display: -webkit-box;
overflow-clip-margin: 0.2em;
overflow-clip-margin: var(--d2l-overflow-clip-margin, 0.2em);
overflow-wrap: anywhere;
overflow-y: clip;
text-overflow: ellipsis;
Expand Down