Skip to content

Commit f8a8232

Browse files
Update README.md
1 parent 1c7e45c commit f8a8232

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ export const ChangeValidityForm = (...): {
314314
}
315315
```
316316

317+
### TailwindCSS
318+
319+
It is possible to override tailwindcss styles by adding overriding classname after the one that has to be overridden, but this is not default functionality. This could be needed when we want to customize a component which already has themes. For example `SimpleButton` already has paddings, but `SimpleSmallButton` needs smaller paddings. We don't want to use ! / important styles though, as they override everything and and are practically impossible to override.
320+
321+
It should be noted, that the order of classnames given to component does not automatically mean anything. The classes and styles are applied in the order that they are in the css file, which could be quite random and should not be relied on. For that reason we are using [tailwind-merge](https://www.npmjs.com/package/tailwind-merge) package, which takes the order in account and removes the classnames which are overridden. Therefore whenever classnames are used so that the order should be taken into account, `twMerge` function should be used to combine the classnames.
322+
317323
## Yarn workspaces / monorepo structure
318324

319325
This repository has currently yarn workspaces in following folders:

0 commit comments

Comments
 (0)