Skip to content

Commit 3905d9b

Browse files
committed
Update formatting style
1 parent 5320ac5 commit 3905d9b

9 files changed

Lines changed: 1162 additions & 1161 deletions

File tree

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ root = true
55
charset = utf-8
66
end_of_line = lf
77
indent_size = 4
8-
indent_style = space
8+
indent_style = tab
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
1111

@@ -14,3 +14,4 @@ trim_trailing_whitespace = false
1414

1515
[*.{json,yml}]
1616
indent_size = 2
17+
indent_style = space

.eslintrc.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
module.exports = {
2-
extends: ['@zazen/eslint-config/typescript'],
3-
env: {
4-
node: true,
5-
},
6-
rules: {
7-
'@typescript-eslint/indent': 'off',
8-
'@typescript-eslint/space-before-function-paren': 'off',
2+
extends: ['@zazen/eslint-config/typescript'],
3+
env: {
4+
node: true,
5+
},
6+
rules: {
7+
'@typescript-eslint/indent': 'off',
8+
'@typescript-eslint/space-before-function-paren': 'off',
99

10-
'@typescript-eslint/explicit-function-return-type': 'off',
11-
},
12-
overrides: [
13-
{
14-
// Jest config
15-
files: [
16-
'**/__tests__/**/*.{js,ts,tsx}',
17-
'**/*.@(spec|test).{js,ts,tsx}',
18-
],
19-
env: {
20-
jest: true,
21-
},
22-
},
23-
],
10+
'@typescript-eslint/explicit-function-return-type': 'off',
11+
},
12+
overrides: [
13+
{
14+
// Jest config
15+
files: [
16+
'**/__tests__/**/*.{js,ts,tsx}',
17+
'**/*.@(spec|test).{js,ts,tsx}',
18+
],
19+
env: {
20+
jest: true,
21+
},
22+
},
23+
],
2424
}

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ This plugin requires a `fontMetrics` key added to your Tailwind theme. It should
1818

1919
```ts
2020
{
21-
ascent: number
22-
descent: number
23-
lineGap: number
24-
unitsPerEm: number
25-
capHeight: number
21+
ascent: number
22+
descent: number
23+
lineGap: number
24+
unitsPerEm: number
25+
capHeight: number
2626
}
2727
```
2828

@@ -33,24 +33,24 @@ These values can be determined by using the [Capsize website](https://seek-oss.g
3333
```js
3434
// tailwind.config.js
3535
module.exports = {
36-
theme: {
37-
fontFamily: {
38-
sans: ['Inter', 'sans-serif'],
39-
},
40-
fontMetrics: {
41-
sans: {
42-
capHeight: 2048,
43-
ascent: 2728,
44-
descent: -680,
45-
lineGap: 0,
46-
unitsPerEm: 2816,
47-
},
48-
},
49-
fontSize: { ... },
50-
lineHeight: { ... },
51-
...
52-
},
53-
plugins: [require('tailwindcss-capsize')],
36+
theme: {
37+
fontFamily: {
38+
sans: ['Inter', 'sans-serif'],
39+
},
40+
fontMetrics: {
41+
sans: {
42+
capHeight: 2048,
43+
ascent: 2728,
44+
descent: -680,
45+
lineGap: 0,
46+
unitsPerEm: 2816,
47+
},
48+
},
49+
fontSize: { ... },
50+
lineHeight: { ... },
51+
...
52+
},
53+
plugins: [require('tailwindcss-capsize')],
5454
}
5555
```
5656

@@ -94,12 +94,12 @@ By default the plugin replaces the `fontFamily`, `fontSize`, and `lineHeight` co
9494

9595
```diff
9696
.font-sans {
97-
+ --ascent-scale: 0.9688;
98-
+ --descent-scale: 0.2415;
99-
+ --cap-height-scale: 0.7273;
100-
+ --line-gap-scale: 0;
101-
+ --line-height-scale: 1.2102;
102-
font-family: Inter, sans-serif;
97+
+ --ascent-scale: 0.9688;
98+
+ --descent-scale: 0.2415;
99+
+ --cap-height-scale: 0.7273;
100+
+ --line-gap-scale: 0;
101+
+ --line-height-scale: 1.2102;
102+
font-family: Inter, sans-serif;
103103
}
104104
```
105105

@@ -119,7 +119,7 @@ Sometimes an interface calls for truncating text to a single line or clamping te
119119
<!-- ❌ Does NOT work -->
120120

121121
<p class="font-sans text-base leading-none capsize truncate">
122-
Text to be truncated to a single line
122+
Text to be truncated to a single line
123123
</p>
124124
```
125125

@@ -129,7 +129,7 @@ To solve this, a child element to the element with the `.capsize` class should w
129129
<!-- ✅ Does work! -->
130130

131131
<p class="font-sans text-base leading-none capsize">
132-
<span class="truncate">Text to be truncated to a single line</span>
132+
<span class="truncate">Text to be truncated to a single line</span>
133133
</p>
134134
```
135135

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)