@takecasper/acuity-design-system 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -108,6 +108,19 @@ Certain changes don't need to trigger lib publishing, such as adding new stories
108
108
 
109
109
  ## Best practices
110
110
 
111
+ ### Styling with Tailwind
112
+
113
+ We are having an internal convention to style all components using `ds-` prefix. The reason for this is to avoid conflicting classes in projects that are using design system library.
114
+ The prefix option lets us configure a prefix we want added to the beginning of every Tailwind class to avoid conflicts.
115
+ But if you enable it, you need to make sure you actually use that prefix in your HTML files.
116
+
117
+ Consequently, regular classes such as `text-neutrals-black`, `flex-row`, etc., must be prefixed with a designated prefix. Subsequently, styling our components in the design system will require utilizing prefixed classes, such as `ds-text-neutrals-black` or `ds-flex-row`.
118
+ For pseudo-classes, the `ds` prefix should be appended after the pseudo-class indicator. For example `hover:ds-text-neutrals-white`,`active:ds-bg-acuity-blue`, etc.
119
+
120
+ [Source](https://tailwindcss.com/docs/configuration#prefix)
121
+
122
+ [Reason for this](https://github.com/tailwindlabs/tailwindcss/discussions/9824).
123
+
111
124
  ### Adding new components
112
125
 
113
126
  For easier development and conditional rendering of tailwind's utility classes it is recommended to use the following 3 libraries when adding new components: