Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(www): /guidelines/color modal title color for dark mode #19147

Merged
merged 2 commits into from
Oct 30, 2019
Merged
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
13 changes: 10 additions & 3 deletions www/src/components/guidelines/color/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,17 @@ const modalContent = (palette, color) => {
</Box>
</Column>
<Column bg="white">
<Text as="p" fontFamily="monospace" fontWeight="bold" mr={3} mb={4}>
<Text
as="p"
color="grey.80"
fontFamily="monospace"
fontWeight="bold"
mr={3}
mb={4}
>
colors.{color}[{colorNumber}] {c.name && c.name}
</Text>
<Text as="span" fontWeight="body" ml="auto">
<Text as="span" color="grey.80" fontWeight="body" ml="auto">
{c.contrast.colorOnWhite.toFixed(2)} /{` `}
{getA11yLabel(c.a11y)}
</Text>
Expand All @@ -190,7 +197,7 @@ const ColorModal = ({ palette, color, handleModalClose }) => {
return (
<>
<Flex alignItems="baseline" p={{ xxs: 6, md: 8 }}>
<Heading mr={4} mt={0}>
<Heading color="black" mr={4} mt={0}>
{palette[color].name}
</Heading>
<CloseButton
Expand Down
4 changes: 2 additions & 2 deletions www/src/utils/guidelines/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { rgb as wcag } from "wcag-contrast"
import hexRgb from "hex-rgb"
import { normal } from "color-blend"

import theme from "./theme"
import { colors } from "../../gatsby-plugin-theme-ui"

// adapted from https://github.com/jxnblk/colorable 🙏
const minimums = {
Expand Down Expand Up @@ -78,7 +78,7 @@ export const colorable = function(hex) {
}

result.a11y = {
...a11y(hex, theme.colors.white),
...a11y(hex, colors.white),
}

return result
Expand Down
35 changes: 0 additions & 35 deletions www/src/utils/guidelines/theme.js

This file was deleted.