Skip to content

Commit 6236c83

Browse files
authored
Merge pull request #944 from PaloAltoNetworks/frontend/remove-preflight
[WebUI] Remove Tailwind preflight styles
2 parents 9a9edac + ee7fd77 commit 6236c83

7 files changed

Lines changed: 66 additions & 11 deletions

File tree

docusaurus.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import Mermaid from "@theme/Mermaid";
1+
import tailwindPlugin from "./plugins/tailwind-config.cjs";
22

33
/**
44
* Copyright (c) 2017-present, Facebook, Inc.
55
*
66
* This source code is licensed under the MIT license found in the
77
* LICENSE file in the root directory of this source tree.
88
*/
9-
let baseUrl
9+
let baseUrl;
1010
if (process.env.CI_MERGE_REQUEST_IID) {
1111
if (process.env.CI_PROJECT_DIR == "dev") {
1212
baseUrl = "/";
@@ -1159,6 +1159,7 @@ const config = {
11591159
gtm: "GTM-PLXD79N",
11601160
},
11611161
],
1162+
tailwindPlugin,
11621163
],
11631164
stylesheets: [
11641165
{

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"slick-carousel": "^1.8.1",
7272
"stackdriver-errors-js": "^0.12.0",
7373
"tailwind-merge": "^3.2.0",
74-
"tailwindcss": "^4.1.3",
74+
"tailwindcss": "^4.1.10",
7575
"turndown": "^7.2.0"
7676
},
7777
"browserslist": {
@@ -87,9 +87,12 @@
8787
]
8888
},
8989
"devDependencies": {
90+
"autoprefixer": "^10.4.21",
9091
"cross-env": "^7.0.3",
9192
"husky": "^8.0.2",
9293
"lint-staged": "^13.0.3",
94+
"postcss": "^8.5.6",
95+
"postcss-import": "^16.1.1",
9396
"prettier": "2.7.1",
9497
"rimraf": "^3.0.2",
9598
"run-script-os": "^1.1.6",

plugins/tailwind-config.cjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
function tailwindPlugin(context, options) {
2+
return {
3+
name: "tailwind-plugin",
4+
configurePostCss(postcssOptions) {
5+
postcssOptions.plugins = [
6+
require("postcss-import"),
7+
require("@tailwindcss/postcss"),
8+
require("autoprefixer"),
9+
];
10+
return postcssOptions;
11+
},
12+
};
13+
}
14+
15+
module.exports = tailwindPlugin;

src/components/AceternityUI/PartnerTools.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ const Feature = ({ buttonClass, title, description, logo, index, cta }) => {
9191
<div className="flex justify-between mb-4 relative z-10 px-10 text-neutral-600 dark:text-neutral-400">
9292
<img style={{ width: "50px" }} src={logo} />
9393
<Link to={cta.src}>
94-
<button className="relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none">
94+
<button
95+
className="relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none"
96+
style={{ border: 0 }}
97+
>
9598
<span className={buttonClass} />
9699
<span className="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-slate-950 px-3 py-1 text-sm font-medium text-white backdrop-blur-3xl">
97100
{cta.text}

src/components/AceternityUI/Tabs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export const Tabs = ({
5858
tabClassName
5959
)}
6060
style={{
61+
backgroundColor: "transparent",
62+
border: 0,
6163
transformStyle: "preserve-3d",
6264
"&:hover": { cursor: "pointer" },
6365
}}

src/css/custom.scss

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@
1111
*/
1212
/* You can override the default Infima variables here. */
1313

14-
@use "tailwindcss";
14+
@layer theme, base, components, utilities;
15+
@import "tailwindcss/theme.css" layer(theme);
16+
@import "tailwindcss/utilities.css" layer(utilities);
1517

1618
// revert default list-style overridden by tailwindcss
17-
@layer base {
18-
ul,
19-
ol {
20-
list-style: revert;
21-
}
22-
}
19+
// @layer base {
20+
// ul,
21+
// ol {
22+
// list-style: revert;
23+
// }
24+
// }
2325

2426
@import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap");
2527

tailwind.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const { fontFamily } = require("tailwindcss/defaultTheme");
2+
3+
/** @type {import('tailwindcss').Config} */
4+
module.exports = {
5+
corePlugins: {
6+
preflight: false,
7+
container: false,
8+
},
9+
darkMode: ["class", '[data-theme="dark"]'],
10+
content: ["./src/**/*.{jsx,js,tsx,html}"],
11+
theme: {
12+
extend: {
13+
fontFamily: {
14+
sans: ['"Inter"', ...fontFamily.sans],
15+
jakarta: ['"Plus Jakarta Sans"', ...fontFamily.sans],
16+
mono: ['"Fira Code"', ...fontFamily.mono],
17+
},
18+
borderRadius: {
19+
sm: "4px",
20+
},
21+
screens: {
22+
sm: "0px",
23+
lg: "997px",
24+
},
25+
colors: {},
26+
},
27+
},
28+
plugins: [],
29+
};

0 commit comments

Comments
 (0)