From 75f7be2aacfe1ab237aa805e2b6cdcf1e646391e Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 27 Feb 2024 04:04:46 +0100 Subject: [PATCH] Apply tailwindcss rules with `!important` (#29437) As per discussion in https://github.com/go-gitea/gitea/pull/29423, I think this is the right way that does not burden developers having to think about CSS precedence which should be irrelevant with an atomic CSS framework. --------- Co-authored-by: wxiaoguang (cherry picked from commit e55926ebfe88d6ee079842967dc7dccc2a9cdbf2) --- tailwind.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tailwind.config.js b/tailwind.config.js index 8c474c33a8..7f36822001 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -6,6 +6,7 @@ const isProduction = env.NODE_ENV !== 'development'; export default { prefix: 'tw-', + important: true, // the frameworks are mixed together, so tailwind needs to override other framework's styles content: [ isProduction && '!./templates/devtest/**/*', isProduction && '!./web_src/js/standalone/devtest.js',