Skip to content

Commit

Permalink
fix(code-block): button styles (#1566)
Browse files Browse the repository at this point in the history
* fix(code-block): button styles

fixes #1541

* fix(code-block): styles
  • Loading branch information
bennypowers authored May 22, 2024
1 parent 8365fac commit b443fe2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .changeset/spicy-planes-lead.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@rhds/elements": patch
---
`<rh-code-block>`: corrected 'show more' button styles
56 changes: 28 additions & 28 deletions elements/rh-code-block/rh-code-block.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
border-radius: var(--rh-border-radius-default, 3px);
width: var(--rh-length-3xl, 48px);
height: var(--rh-length-3xl, 48px);
}

.shadow-fab:is(:hover, :focus, :active) {
background:
var(
--_code-action-hover-focus-active-background,
var(--rh-color-surface-light, #e0e0e0)
);
}

&:is(:hover, :focus, :active) {
background:
var(
--_code-action-hover-focus-active-background,
var(--rh-color-surface-light, #e0e0e0)
);
}

& svg {
width: var(--rh-size-icon-02, 24px);
height: var(--rh-size-icon-02, 24px);
color: var(--_code-action-color, var(--rh-color-text-primary-on-light, #151515));
}

.dark & {
--_code-action-color: var(--rh-color-text-primary-on-dark, #ffffff);
--_code-action-hover-focus-active-background: var(--rh-color-surface-dark, #383838);
}
.shadow-fab svg {
width: var(--rh-size-icon-02, 24px);
height: var(--rh-size-icon-02, 24px);
color: var(--_code-action-color, var(--rh-color-text-primary-on-light, #151515));
}

.dark .shadow-fab {
--_code-action-color: var(--rh-color-text-primary-on-dark, #ffffff);
--_code-action-hover-focus-active-background: var(--rh-color-surface-dark, #383838);
}

#container,
Expand Down Expand Up @@ -163,10 +163,10 @@
place-self: start center;
height: 100%;
position: relative;
}

& rh-tooltip {
display: block;
}
#actions rh-tooltip {
display: block;
}

#expand {
Expand All @@ -185,14 +185,14 @@
font-size: var(--rh-font-size-body-text-sm, 0.875rem);
font-weight: var(--rh-font-weight-body-text-regular, 400);
line-height: var(--rh-line-height-body-text, 1.5);
}

& svg {
width: 11px;
height: 7px;
rotate: var(--_expand-toggle-rotate, 180deg);
transform: rotate 0.2s ease-in-out;
color: var(--_expand-toggle-icon-color, var(--rh-color-icon-secondary-on-light, #151515));
}
#expand svg {
width: 11px;
height: 7px;
rotate: var(--_expand-toggle-rotate, 180deg);
transform: rotate 0.2s ease-in-out;
color: var(--_expand-toggle-icon-color, var(--rh-color-icon-secondary-on-light, #151515));
}

#container.compact {
Expand Down

0 comments on commit b443fe2

Please sign in to comment.