File tree Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -608,14 +608,14 @@ module.exports = {
608
608
** Purge:**
609
609
610
610
``` html
611
- <div class =" text-primary text- opacity-50" ></div >
612
- <div class =" bg-secondary bg- opacity-50" ></div >
613
- <div class =" bg-gray bg- opacity-50" ></div >
614
- <div class =" text-blue text- opacity-50" ></div >
611
+ <div class =" text-opacity-50 text-primary " ></div >
612
+ <div class =" bg-opacity-50 bg-secondary " ></div >
613
+ <div class =" bg-opacity-50 bg-gray " ></div >
614
+ <div class =" text-opacity-50 text-blue " ></div >
615
615
<div class =" bg-red-400" ></div >
616
616
<div class =" bg-red-500" ></div >
617
617
<div class =" bg-red-600" ></div >
618
- <div class =" bg-green bg- opacity-50" ></div >
618
+ <div class =" bg-opacity-50 bg-green " ></div >
619
619
<div class =" bg-white bg-opacity-50" ></div >
620
620
```
621
621
** Output:**
@@ -784,6 +784,40 @@ module.exports = {
784
784
}
785
785
```
786
786
787
+ ### useHost
788
+
789
+ If ` useHost ` is set to ` true ` , ` :host ` is used instead of ` :root ` for variables injection.
790
+
791
+ #### Config
792
+
793
+ ``` javascript
794
+ // tailwind.config.js
795
+
796
+ module .exports = {
797
+ theme: {
798
+ variables: {
799
+ DEFAULT : {
800
+ colors: {
801
+ green: ' #11ff00' ,
802
+ },
803
+ },
804
+ },
805
+ },
806
+ plugins: [
807
+ require (' @mertasan/tailwindcss-variables' )({
808
+ useHost: true ,
809
+ })
810
+ ]
811
+ }
812
+ ```
813
+
814
+ ** Output:**
815
+
816
+ ``` css
817
+ :host {
818
+ --colors-green : #11ff00 ;
819
+ }
820
+ ```
787
821
788
822
### extendColors for colorVariable
789
823
You can’t perform that action at this time.
0 commit comments