Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 46a3cf5

Browse files
author
Greg Rickaby
authored
Merge pull request #170 from WebDevStudios/feature/tailwind-defaults
Feature/tailwind defaults
2 parents e96723e + 47a3b6c commit 46a3cf5

32 files changed

+83
-683
lines changed

components/atoms/Button/Button.module.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.button {
2-
@apply inline-flex items-center justify-center rounded border transition-colors duration-150 ease-in-out cursor-pointer uppercase font-secondary;
2+
@apply inline-flex items-center justify-center rounded border transition-colors duration-150 ease-in-out cursor-pointer uppercase;
33

44
& svg {
55
@apply ml-12;
@@ -21,19 +21,19 @@
2121

2222
/* SIZES */
2323
&.lg {
24-
@apply px-16 py-12 text-h5;
24+
@apply px-6 py-3;
2525

2626
line-height: 1.5625rem;
2727
}
2828

2929
&.md {
30-
@apply px-16 py-12 text-sm;
30+
@apply px-3 py-1.5;
3131

3232
line-height: 1.25rem;
3333
}
3434

3535
&.sm {
36-
@apply px-16 py-8 text-caption;
36+
@apply px-1.5 py-0.5;
3737

3838
line-height: 1.0625rem;
3939
}
@@ -44,15 +44,15 @@
4444

4545
/* TYPES */
4646
&.primary {
47-
@apply bg-primary text-white border-white border-opacity-0;
47+
@apply bg-white;
4848

4949
&.disabled {
5050
@apply opacity-50;
5151
}
5252
}
5353

5454
&.secondary {
55-
@apply bg-white bg-opacity-0 text-primary border-primary;
55+
@apply bg-black text-white;
5656

5757
&.disabled {
5858
@apply opacity-50;

components/atoms/Code/Code.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
@apply mb-40;
33

44
& > pre {
5-
@apply rounded-larger;
5+
@apply rounded;
66
}
77
}

components/atoms/Icon/Icon.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import PropTypes from 'prop-types'
22
import React from 'react'
3-
import tailwindConfig from '../../../tailwind.config.js'
43
import {icons} from './icons'
54

65
/**
@@ -16,7 +15,7 @@ function sizeToPx(size) {
1615
lg: '1.5'
1716
}
1817

19-
return sizeToRem[size] * parseFloat(tailwindConfig.theme.fontSize['root-em'])
18+
return sizeToRem[size] * 16
2019
}
2120

2221
/**

components/atoms/Icon/Icon.stories.mdx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Use this component to display an icon. See the Icons Story in General for a list
1010

1111
<Canvas>
1212
<Story name="Component">
13-
<Icon icon="info" title="Info" className="text-black" />
13+
<Icon icon="info" title="Info" className="" />
1414
</Story>
1515
</Canvas>
1616

@@ -20,9 +20,9 @@ Three sizes are supported.
2020

2121
<Canvas>
2222
<Story name="Sizes">
23-
<Icon icon="star" size="sm" title="Star" className="my-8 text-black" />
24-
<Icon icon="star" size="md" title="Star" className="my-8 text-black" />
25-
<Icon icon="star" size="lg" title="Star" className="my-8 text-black" />
23+
<Icon icon="star" size="sm" title="Star" className="my-8 " />
24+
<Icon icon="star" size="md" title="Star" className="my-8 " />
25+
<Icon icon="star" size="lg" title="Star" className="my-8 " />
2626
</Story>
2727
</Canvas>
2828

@@ -37,14 +37,14 @@ Two styles are supported - line and fill icons.
3737
style="line"
3838
size="lg"
3939
title="Volume up"
40-
className="my-8 text-black"
40+
className="my-8 "
4141
/>
4242
<Icon
4343
icon="clipboard"
4444
style="fill"
4545
size="lg"
4646
title="Volume up"
47-
className="my-8 text-black"
47+
className="my-8 "
4848
/>
4949
</Story>
5050
</Canvas>
@@ -55,12 +55,7 @@ The icon will inherit the closest defined text color using `currentColor`. If yo
5555

5656
<Canvas>
5757
<Story name="Color">
58-
<Icon
59-
icon="colorPalette"
60-
size="lg"
61-
title="Color palette"
62-
className="text-primary"
63-
/>
58+
<Icon icon="colorPalette" size="lg" title="Color palette" className="" />
6459
</Story>
6560
</Canvas>
6661

@@ -75,12 +70,7 @@ See [this article on CSS Tricks](https://css-tricks.com/accessible-svgs/#example
7570

7671
<Canvas>
7772
<Story name="Accessibility">
78-
<Icon
79-
icon="options"
80-
title="Options"
81-
ariaHidden={false}
82-
className="text-black"
83-
/>
73+
<Icon icon="options" title="Options" ariaHidden={false} className="" />
8474
</Story>
8575
</Canvas>
8676

@@ -96,7 +86,7 @@ export const Template = (args) => <Icon {...args} />
9686
args={{
9787
icon: 'info',
9888
title: 'Info',
99-
className: 'text-black'
89+
className: ''
10090
}}
10191
>
10292
{Template.bind({})}

components/atoms/Image/Image.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
}
77

88
& .caption {
9-
@apply text-center font-secondary text-xs pt-12;
9+
@apply text-center pt-12;
1010
}
1111
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.pullquote {
2-
@apply mb-24 p-20 px-40 text-center;
2+
@apply mb-6 p-5 px-10 text-center;
33

4-
& p {
5-
@apply font-secondary text-h5;
4+
& blockquote {
5+
@apply mb-8;
66
}
77

8-
& > figcaption {
9-
@apply font-secondary text-xs pt-12;
8+
& figcaption {
9+
@apply font-bold;
1010
}
1111
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
.quote {
2-
@apply px-28 border-l mb-40;
2+
@apply mb-6 p-5 px-10 border-l;
33

4-
& p {
5-
@apply font-secondary text-h5;
4+
& blockquote {
5+
@apply mb-8;
66
}
77

8-
& > figcaption {
9-
@apply font-secondary text-xs pt-12;
8+
& figcaption {
9+
@apply font-bold;
1010
}
1111
}

components/atoms/RichText/RichText.module.css

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010
&.ol,
1111
& p,
1212
&.p {
13-
@apply font-primary text-root-em mb-20;
14-
15-
& > a {
16-
@apply text-primary;
17-
}
13+
@apply mb-20;
1814
}
1915

2016
& ul,
@@ -36,7 +32,7 @@
3632
&.ul {
3733
& li {
3834
&::before {
39-
@apply absolute block bg-tertiary-lighter rounded-full;
35+
@apply absolute block rounded-full;
4036

4137
content: '';
4238
width: 5px;
@@ -54,7 +50,7 @@
5450

5551
& > li {
5652
&::before {
57-
@apply absolute block text-tertiary-lighter left-0 italic;
53+
@apply absolute block left-0 italic;
5854

5955
content: counter(item) '. ';
6056
counter-increment: item;
@@ -66,26 +62,26 @@
6662
/* Heading Styles */
6763
& h1,
6864
&.h1 {
69-
@apply font-secondary text-h1 mb-20;
65+
@apply mb-20;
7066
}
7167

7268
& h2,
7369
&.h2 {
74-
@apply font-secondary text-h2 mb-20;
70+
@apply mb-20;
7571
}
7672

7773
& h3,
7874
&.h3 {
79-
@apply font-secondary text-h3 mb-20;
75+
@apply mb-20;
8076
}
8177

8278
& h4,
8379
&.h4 {
84-
@apply font-secondary text-h4 mb-12;
80+
@apply mb-12;
8581
}
8682

8783
& h5,
8884
&.h5 {
89-
@apply font-secondary text-h5 mb-12;
85+
@apply mb-12;
9086
}
9187
}

components/atoms/Separator/Separator.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import cn from 'classnames'
22
import PropTypes from 'prop-types'
33
import React from 'react'
4+
import Container from '../Container'
45
import styles from './Separator.module.css'
56

67
/**
@@ -17,9 +18,9 @@ export default function Separator({className, fullWidth}) {
1718
{fullWidth ? (
1819
<hr className={cn(styles.separator, className)} />
1920
) : (
20-
<div>
21+
<Container>
2122
<hr className={cn(styles.separator, className)} />
22-
</div>
23+
</Container>
2324
)}
2425
</>
2526
)
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.separator {
2-
@apply w-full bg-tertiary-lightest border-none my-40;
3-
4-
height: 1px;
2+
@apply w-full border-b my-40;
53
}

0 commit comments

Comments
 (0)