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

Commit becf98e

Browse files
committed
fix: style issue
1 parent 9c3eace commit becf98e

File tree

4 files changed

+81
-9
lines changed

4 files changed

+81
-9
lines changed

src/pages/Content/styles/components/App.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
position: absolute;
33
width: 450px;
44
height: 600px;
5-
z-index: 9998;
5+
z-index: 99998;
66
@apply bg-white shadow rounded-lg overflow-hidden flex flex-col;
77

88
&--inactive {
99
display: none;
1010
}
1111
&__header {
12-
@apply bg-purple-800 px-5 py-3 text-white font-bold cursor-move flex justify-between items-center;
12+
@apply bg-purple-800 px-5 py-3 text-white font-bold text-lg cursor-move flex justify-between items-center;
1313
}
1414
&__close-button {
1515
@apply p-1

src/pages/Content/styles/components/TranslationItem.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
}
1313
}
1414
&__original {
15-
@apply bg-gray-50 hover:bg-gray-100 p-3 rounded cursor-pointer;
15+
@apply bg-gray-50 hover:bg-gray-100 p-3 rounded cursor-pointer leading-normal;
1616

1717
.ReactCollapse--collapse {
18-
min-height: 36px;
18+
min-height: 48px;
1919
will-change: height;
2020
transition-property: height;
2121

@@ -26,7 +26,7 @@
2626
}
2727
}
2828
&__result {
29-
@apply rounded bg-yellow-50 p-3 space-y-2;
29+
@apply rounded bg-yellow-50 p-3 space-y-2 leading-normal;
3030
}
3131
&__source-lang-tag {
3232
@apply px-2 py-1 bg-green-50 text-green-600 text-sm rounded;

src/pages/Content/styles/index.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
@import "tailwindcss/components";
2-
@import "tailwindcss/utilities";
3-
41
@import "./components/Icon";
52
@import './components/App';
63
@import './components/TranslationList';
@@ -15,6 +12,10 @@
1512
left: 0;
1613
margin: 0;
1714
padding: 0;
15+
font-size: 16px;
16+
z-index: 99997;
17+
18+
@apply font-sans leading-normal;
1819
}
1920

2021
#ate-container {
@@ -31,7 +32,7 @@
3132

3233
#ate-icon {
3334
display: none;
34-
z-index: 9999;
35+
z-index: 99999;
3536
position: absolute;
3637
top: 0;
3738
left: 0;

tailwind.config.js

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,69 @@ module.exports = {
55
},
66
darkMode: false, // or 'media' or 'class'
77
theme: {
8+
fontSize: {
9+
xs: [remToPX(0.75), { lineHeight: remToPX(1) }],
10+
sm: [remToPX(0.875), { lineHeight: remToPX(1.25) }],
11+
base: [remToPX(1), { lineHeight: remToPX(1.5) }],
12+
lg: [remToPX(1.125), { lineHeight: remToPX(1.75) }],
13+
xl: [remToPX(1.25), { lineHeight: remToPX(1.75) }],
14+
'2xl': [remToPX(1.5), { lineHeight: remToPX(2) }],
15+
'3xl': [remToPX(1.875), { lineHeight: remToPX(2.25) }],
16+
'4xl': [remToPX(2.25), { lineHeight: remToPX(2.5) }],
17+
'5xl': [remToPX(3), { lineHeight: '1' }],
18+
'6xl': [remToPX(3.75), { lineHeight: '1' }],
19+
'7xl': [remToPX(4.5), { lineHeight: '1' }],
20+
'8xl': [remToPX(6), { lineHeight: '1' }],
21+
'9xl': [remToPX(8), { lineHeight: '1' }],
22+
},
23+
spacing: {
24+
px: '1px',
25+
0: '0px',
26+
0.5: remToPX(0.125),
27+
1: remToPX(0.25),
28+
1.5: remToPX(0.375),
29+
2: remToPX(0.5),
30+
2.5: remToPX(0.625),
31+
3: remToPX(0.75),
32+
3.5: remToPX(0.875),
33+
4: remToPX(1),
34+
5: remToPX(1.25),
35+
6: remToPX(1.5),
36+
7: remToPX(1.75),
37+
8: remToPX(2),
38+
9: remToPX(2.25),
39+
10: remToPX(2.5),
40+
11: remToPX(2.75),
41+
12: remToPX(3),
42+
14: remToPX(3.5),
43+
16: remToPX(4),
44+
20: remToPX(5),
45+
24: remToPX(6),
46+
28: remToPX(7),
47+
32: remToPX(8),
48+
36: remToPX(9),
49+
40: remToPX(10),
50+
44: remToPX(11),
51+
48: remToPX(12),
52+
52: remToPX(13),
53+
56: remToPX(14),
54+
60: remToPX(15),
55+
64: remToPX(16),
56+
72: remToPX(18),
57+
80: remToPX(20),
58+
96: remToPX(24),
59+
},
60+
borderRadius: {
61+
none: '0px',
62+
sm: remToPX(0.125),
63+
DEFAULT: remToPX(0.25),
64+
md: remToPX(0.375),
65+
lg: remToPX(0.5),
66+
xl: remToPX(0.75),
67+
'2xl': remToPX(1),
68+
'3xl': remToPX(1.5),
69+
full: '9999px',
70+
},
871
extend: {},
972
},
1073
variants: {
@@ -14,3 +77,11 @@ module.exports = {
1477
},
1578
plugins: [require('@tailwindcss/forms')],
1679
}
80+
81+
/**
82+
* @param {number} num
83+
* @returns {string}
84+
*/
85+
function remToPX(num) {
86+
return num * 16 + 'px'
87+
}

0 commit comments

Comments
 (0)