1
1
mirror of https://github.com/primer/css.git synced 2025-01-06 14:29:26 +03:00

Temporarly disable color tables

This commit is contained in:
simurai 2020-09-19 19:56:51 +09:00
parent bc0daf9cd3
commit b860ea4e93
4 changed files with 18 additions and 0 deletions

View File

@ -6,14 +6,17 @@ source: 'https://github.com/primer/css/blob/master/src/support/variables/color-s
bundle: support bundle: support
--- ---
```
import colors from 'primer-colors' import colors from 'primer-colors'
import {Box, Flex, Heading, Link, StyledOcticon} from '@primer/components' import {Box, Flex, Heading, Link, StyledOcticon} from '@primer/components'
import {Link as LinkIcon} from '@primer/octicons-react' import {Link as LinkIcon} from '@primer/octicons-react'
import {palettes, variables} from '../../src/color-variables' import {palettes, variables} from '../../src/color-variables'
import {PaletteTable, PaletteCell, overlayColor} from '../../src/color-system' import {PaletteTable, PaletteCell, overlayColor} from '../../src/color-system'
```
## Color palette ## Color palette
```
<Flex flexWrap="wrap" mr={-2}> <Flex flexWrap="wrap" mr={-2}>
{palettes {palettes
.concat( .concat(
@ -38,9 +41,11 @@ import {PaletteTable, PaletteCell, overlayColor} from '../../src/color-system'
</Flex.Item> </Flex.Item>
))} ))}
</Flex> </Flex>
```
## Color variables ## Color variables
```
<Flex flexWrap="wrap" mr={[0, 0, -4]}> <Flex flexWrap="wrap" mr={[0, 0, -4]}>
{palettes.map(({name, title, value, values}) => ( {palettes.map(({name, title, value, values}) => (
<Flex id={name} flexDirection="column" width={[1, 1, 1 / 2]} pr={[0, 0, 4]} mb={4}> <Flex id={name} flexDirection="column" width={[1, 1, 1 / 2]} pr={[0, 0, 4]} mb={4}>
@ -70,6 +75,7 @@ import {PaletteTable, PaletteCell, overlayColor} from '../../src/color-system'
</Flex> </Flex>
))} ))}
</Flex> </Flex>
```
## Color utilities ## Color utilities

View File

@ -5,7 +5,9 @@ status: Experimental
bundle: alerts bundle: alerts
--- ---
```
import {Variables, DeprecationIcon} from '../../src/variables' import {Variables, DeprecationIcon} from '../../src/variables'
```
<Variables> <Variables>

View File

@ -7,8 +7,10 @@ source: 'https://github.com/primer/css/tree/master/src/utilities/borders.scss'
bundle: utilities bundle: utilities
--- ---
```
import {palettes, borders} from '../../src/color-variables' import {palettes, borders} from '../../src/color-variables'
import {PaletteTable, PaletteCell, PaletteValue} from '../../src/color-system' import {PaletteTable, PaletteCell, PaletteValue} from '../../src/color-system'
```
Utilities for borders, and border radius. Utilities for borders, and border radius.
@ -223,6 +225,7 @@ You can adjust border widths on all sides or each side individually with respons
## Border color utilities ## Border color utilities
```
<PaletteTable <PaletteTable
values={borders} values={borders}
prefix="bg" prefix="bg"
@ -233,3 +236,4 @@ You can adjust border widths on all sides or each side individually with respons
]} ]}
style={{borderSpacing: '0 4px'}} style={{borderSpacing: '0 4px'}}
/> />
```

View File

@ -5,6 +5,7 @@ status: Stable
status_issue: 'https://github.com/github/design-systems/issues/97' status_issue: 'https://github.com/github/design-systems/issues/97'
--- ---
```
import {Box, BorderBox} from '@primer/components' import {Box, BorderBox} from '@primer/components'
import {palettes, allColors} from '../../src/color-variables' import {palettes, allColors} from '../../src/color-variables'
import {PaletteTable, PaletteTableFragment, PaletteHeading, PaletteCell, PaletteValue} from '../../src/color-system' import {PaletteTable, PaletteTableFragment, PaletteHeading, PaletteCell, PaletteValue} from '../../src/color-system'
@ -16,6 +17,7 @@ const textColumns = [
'variable', 'variable',
{title: 'Value', Cell: PaletteCell.Background, Value: PaletteValue.Value} {title: 'Value', Cell: PaletteCell.Background, Value: PaletteValue.Value}
] ]
```
Use color utilities to apply color to the background of elements, text, and borders. Use color utilities to apply color to the background of elements, text, and borders.
@ -25,6 +27,7 @@ Background colors are most commonly used for filling large blocks of content or
### Background utilities ### Background utilities
```
<PaletteTable> <PaletteTable>
{palettes.map(({name, title, value}) => ( {palettes.map(({name, title, value}) => (
<PaletteTableFragment name={name} type="bg" sparse key={name}> <PaletteTableFragment name={name} type="bg" sparse key={name}>
@ -36,6 +39,7 @@ Background colors are most commonly used for filling large blocks of content or
</PaletteTableFragment> </PaletteTableFragment>
))} ))}
</PaletteTable> </PaletteTable>
```
## Text colors ## Text colors
@ -128,6 +132,7 @@ You can set the color inheritance on an element by using the `text-inherit` clas
### Text color utilities ### Text color utilities
```
<PaletteTable columns={textColumns}> <PaletteTable columns={textColumns}>
{palettes.map(({name, title, value}) => ( {palettes.map(({name, title, value}) => (
<PaletteTableFragment name={name} type="text" sparse prefix="color" columns={textColumns}> <PaletteTableFragment name={name} type="text" sparse prefix="color" columns={textColumns}>
@ -139,6 +144,7 @@ You can set the color inheritance on an element by using the `text-inherit` clas
</PaletteTableFragment> </PaletteTableFragment>
))} ))}
</PaletteTable> </PaletteTable>
```
## White background ## White background