Skip to content

Commit 8edd4bb

Browse files
authored
hotfix: Fix Safari clipboard copy issue by disabling Tailwind preflight CSS (#480)
- These broke after disabling preflight, so the following adjustments were made: - Adjust primary colors to resolve conflict with Docusaurus' default color - Update font size and line height - Add viewBox for YouTube and GitHub icons to prevent cropping - Remove Roboto Bold in Tailwind config to prevent fallback to Times in h3 and highlighted text (separate CSS conflict, not related to this hotfix) Signed-off-by: manasmanohar <[email protected]>
1 parent 306b51d commit 8edd4bb

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

src/components/Community.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const Community = () => {
1010
Are you curious, 🤔 or do you have questions burning in your mind? 🔥
1111
Look no further! Join our lively Community Forum where you can:
1212
</p>
13-
<ul className="grid gap-6 sm:grid-cols-2 xl:gap-8">
13+
<ul className="grid gap-6 sm:grid-cols-2 xl:gap-8 list-none">
1414
{/*<li>*/}
1515
{/* <a*/}
1616
{/* href="https://community.keploy.io/"*/}
@@ -47,6 +47,9 @@ export const Community = () => {
4747
<svg
4848
fill="currentColor"
4949
className="h-12 w-12 flex-none text-red-500 "
50+
// Hotfix: Compensate for Tailwind preflight removal causing icon to be cropped
51+
viewBox="0 0 48 48"
52+
5053
>
5154
<rect width="48" height="48" rx="12" />
5255
<path
@@ -95,6 +98,8 @@ export const Community = () => {
9598
<svg
9699
fill="currentColor"
97100
className="h-12 w-12 flex-none text-black "
101+
// Hotfix: Compensate for Tailwind preflight removal causing icon to be cropped
102+
viewBox="0 0 48 48"
98103
>
99104
<rect width="48" height="48" rx="12" />
100105
<path

src/css/custom.css

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,20 @@
1111
@tailwind utilities;
1212

1313
:root {
14+
/* Hotfix: Changed primary color to black to resolve conflict with Docusaurus' default primary orange after disabling Tailwind preflight CSS. Added font size and line height adjustments to compensate for the removal of Tailwind preflight. */
15+
16+
/* --ifm-color-primary-lighter: #ffb575; */
17+
font-size:18px;
18+
line-height: 1.6;
19+
--ifm-color-primary: #000;
20+
21+
--ifm-color-primary-lighter: #FFF;
1422
--ifm-color-primary: #ff914d;
1523
--ifm-color-primary-dark: #e67643;
1624
--ifm-color-primary-darker: #c95919;
1725
--ifm-color-primary-darkest: #be2c1b;
1826
--ifm-color-primary-light: #ffd0a0;
19-
--ifm-color-primary-lighter: #ffb575;
27+
2028
--ifm-color-primary-lightest: #ffceb1;
2129
--ifm-code-font-size: 95%;
2230
--doc-sidebar-width: 275px !important;
@@ -27,12 +35,17 @@
2735
}
2836

2937
html[data-theme="dark"] {
38+
/* Hotfix: Changed 'ifm-color-primary-lighter' to white to resolve conflict with Docusaurus' default color after disabling Tailwind preflight CSS. */
39+
40+
41+
/* --ifm-color-primary-lighter: #ffb575; */
42+
--ifm-color-primary-lighter: #FFF;
43+
3044
--ifm-color-primary: #ff914d;
3145
--ifm-color-primary-dark: #e67643;
3246
--ifm-color-primary-darker: #c95919;
3347
--ifm-color-primary-darkest: #be2c1b;
3448
--ifm-color-primary-light: #ffd0a0;
35-
--ifm-color-primary-lighter: #ffb575;
3649
--ifm-color-primary-lightest: #ffceb1;
3750
--ifm-link-color: var(--ifm-color-primary-lighter);
3851
--ifm-menu-color-active: var(--ifm-color-primary-lighter);
@@ -97,6 +110,10 @@ html[data-theme="light"] {
97110
@apply inline;
98111
}
99112

113+
/* Hotfix: Remove extra margin-bottom on community links subtext in the home page due to Tailwind preflight removal */
114+
h3{
115+
margin-bottom: 0.1rem;
116+
}
100117
h1,
101118
h2,
102119
h3,

tailwind.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ module.exports = {
1313
"./src/pages/**/*.{js,ts,jsx,tsx}",
1414
"./src/theme/**/*.{js,ts,jsx,tsx}",
1515
],
16-
// corePlugins: {
17-
// // preflight: false, // to use Docusaurus base styles
18-
// // container: false, // use container style from docusaurus
19-
// },
16+
corePlugins: {
17+
preflight: false, // to use Docusaurus base styles
18+
// container: false, // use container style from docusaurus
19+
},
2020
// // important: "#tailwind", // incrementally adopt Tailwind by wrapping pages with <div id="tailwind"> </div>
2121
theme: {
2222
extend: {
@@ -102,7 +102,8 @@ module.exports = {
102102
},
103103
fontFamily: {
104104
light: ["Roboto Light", "sans"],
105-
bold: ["Roboto Bold", "sans"],
105+
// hotfix: Remove "Roboto Bold" to prevent fallback to "Times" font due to a potential CSS conflict.
106+
// bold: ["Roboto Bold", "sans"],
106107
},
107108
keyframes: {
108109
"fade-in-down": {

0 commit comments

Comments
 (0)