aliascss 1.1.12 → 1.1.13

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
@@ -2,7 +2,9 @@
2
2
 
3
3
  **Welcome to Aliascss!**
4
4
 
5
- AliasCSS or in short acss, is a post css processor/compiler means it lets you first define classnames in your html element then get processed to corresponig css declaration.
5
+ AliasCSS or in short acss, is a post css processor/compiler means it lets you first define classnames in your html element then get processed to corresponding css declaration.
6
+
7
+ [https:aliascss.com](Offical Documentation site)
6
8
 
7
9
  ## What it is?
8
10
  With aliascss you can style you webpages using class attribute with post-define classname, for example
@@ -13,20 +15,22 @@ OR, using shorthand
13
15
  ```html
14
16
  <h1 class="c-red fs-12px dib"> Hello world</h1>
15
17
  ```
16
- Here we have defined the color, font size, display properties of h1 element first, then aliascss will compiles and defines the classname with the corresponing property and value/s in the styles tag or stylesheets. Generally every aliascss classname hold single propery and value for it.
18
+ Here we have defined the color, font size, display properties of h1 element first, then aliascss will compiles and defines the classname with the corresponding property and value/s in the styles tag or stylesheets. Generally every aliascss classname hold single property and value for it.
17
19
 
18
20
  ## Getting Started
19
21
 
20
22
  ### Install
21
23
 
22
24
  ### NPM
23
- ```
24
- npm install aliascss
25
+ ```sh copy
26
+ npm install --save-dev aliascss
25
27
  ```
26
28
 
27
29
  ### CDN
30
+ ```html copy
31
+ <script defer src="https://cdn.jsdelivr.net/npm/aliascss@latest/dist/aliascss.js"></script>
28
32
 
29
- [https://cdn.jsdelivr.net/npm/aliascss@latest/dist/aliascss.js](https://cdn.jsdelivr.net/npm/aliascss@latest/dist/aliascss.js)
33
+ ```
30
34
 
31
35
  # Documentation
32
36
  If you know CSS then your know already Aliascss. Aliascss let you to apply css directly in the html with the help of post define classname. Let's assume we need to style our h1 element
@@ -50,7 +54,7 @@ Now , if we want same result using aliascss, then
50
54
  Or by using full semantic classnames
51
55
 
52
56
  ```
53
- <h1 class="color-gray font-size18px">Hello World!</h1>
57
+ <h1 class="color-gray font-size-18px">Hello World!</h1>
54
58
 
55
59
  ```
56
60
  > Here if you look carefully the classnames is doing dual responsibility. one is defining classnames and second is also defining css declaration for itself. In AliasCSS ecosystem we first use classnames, then the compiler will define classnames and corresponding property and value in the stylesheet/style tag. you don't have to use aliascss compiler in production.
@@ -60,87 +64,109 @@ Or by using full semantic classnames
60
64
  |------------------|-------------|--------------------------:|
61
65
  |`display-flex`|`df`|`display:flex`|
62
66
  |`list-style-none`|`lsn`|`list-style:none`|
63
- |`margin-left-20px`|`ml20px`|`margin-left:20px`|
64
- |`margin-top-20px`|`mt-20px`|`margin-top:-20px`|
65
- |`border1px-solid-ccc`|`b1px-s-ccc`|`border:1px solid #ccc`|
67
+ |`margin-left-20px`|`ml-20px`|`margin-left:20px`|
68
+ |`margin-top--20px`|`mt--20px`|`margin-top:-20px`|
69
+ |`border-1px-solid-ccc`|`b-1px-s-ccc`|`border:1px solid #ccc`|
66
70
  |`backgound-color-10p20p30p`|`bgc-10p20p30p`|`background-color:rgb(10%, 20%, 30%)`|
67
71
  |`opacity-1`|`o-1`|`opacity:1`|
68
72
  |`opacity-0d5`|`o-0d5`|`opacity:0.5`|
69
73
 
70
74
 
71
75
 
72
- ```There are two ways to use class name, either using shorhand e.g c-red m20px df p20p30px l-30px OR full semantic class name color-red display-flex padding20px30px left-30px```
76
+ ```There are two ways to use class name, either using shorhand e.g c-red m-20px df p-20p-30px l-30px OR full semantic class name color-red display-flex padding-20px-30px left-30px```
73
77
 
74
- ## Selector and Psedu [ hover: focus: active: ]
75
- We can also target psedu selector / element in your class name by using flags(-- or for shorhand -) e.g --hover or -h. For an example:-
78
+ ## Selector and Pseudo [ hover: focus: active: ]
79
+ We can also target pseudo selector / element in your class name by using flags(-- ) e.g --hover or --h. For an example:-
76
80
  ```
77
81
  <div class="bgc-cccccc --hover-bgc-yellow> Hi! i will change background color on hover</div>
78
82
  ```
79
- Here by using --hover flag ( *can be used -h shorthand flag*) we are telling to use it in :hover state
83
+ Here by using --hover flag ( *can be used --h shorthand flag*) we are telling to use it in :hover state
80
84
 
81
85
  Flags:-
82
86
 
83
- | flags |short-flag | corresponding css declaration |
87
+ | flags |short-flag | corresponding css selector |
84
88
  |-------------|---|---------:|
85
- |--active|-a|:active|
86
- |--after|-af|::after|
87
- |--after-hover|-afh|::after:hover|
88
- |--before|-bf|::before|
89
- |--before-hover|-bfh|::before:hover|
90
- |--checked|-ch|:checked|
91
- |--default|-de|:default|
92
- |--disabled|-di|:disabled|
93
- |--empty|-em|:empty|
94
- |--enabled|-en|:enabled|
95
- |--first-child|-fc|:first-child|
96
- |--first-letter|-fl|::first-letter|
97
- |--first-line|-fln|::first-line|
98
- |--first-of-type |-fot|:first-of-type|
99
- |--focus| -fo|:focus|
100
- |--hover|-h|:hover|
101
- |--hover-after|-haf|:hover::after|
102
- |--hover-before|-hbf|:hover::before|
103
- |--hover-target|-htg|:hover:target|
104
- |--in-range|-ir|:in-range|
105
- |--indeterminate|-ind|:indeterminate|
106
- |--invalid|-inv|:invalid|
107
- |--last-child|-lc|:last-child|
108
- |--last-of-type|-lot|:last-of-type|
109
- |--link|-ln|:link|
110
- |--not-|-n-|:not|
111
- |--nth-child-|-nc-|:nth-child|
112
- |--nth-last-child-|-nlc-|:nth-last-child|
113
- |--nth-last-of-type-|-nlot-|:nth-last-of-type|
114
- |--nth-of-type-|-not-|:nth-of-type|
115
- |--only-of-type |-oot|:only-of-type|
116
- |--only-child|-oc|:only-child|
117
- |--optional|-op|:optional|
118
- |--out-of-range|-oor|:out-of-range|
119
- |--placeholder|-ph|::placeholder|
120
- |--read-only |-ro|:read-only|
121
- |--read-write|-rw|:read-write|
122
- |--required|-rq|:required|
123
- |--root|-rt|:root|
124
- |--selection|-s|::selection|
125
- |--scrollbar|-sb|::-webkit-scrollbar|
126
- |--scrollbar-track|-st|::-webkit-scrollbar-track|
127
- |--scrollbar-thumb|-stm|::-webkit-scrollbar-thumb|
128
- |--target |-tg|:target|
129
- |--valid|-v|:valid|
130
- |--visited|-vi|:visited|
89
+ |--active|--a or --ac|:active|
90
+ |--after|--af|::after|
91
+ |--after-hover|--afh|::after:hover|
92
+ |--autofill|--atf|:-webkit-autofill|
93
+ |--anylink|--al|:-webkit-anylink|
94
+ |--backdrop|--bd|::backdrop|
95
+ |--before|--bf|::before|
96
+ |--before-hover|--bfh|::before:hover|
97
+ |--blank|--bl|:blank|
98
+ |--checked|--ch|:checked|
99
+ |--cue|--cu|::cue|
100
+ |--current|--cur|:current|
101
+ |--default|--de|:default|
102
+ |--disabled|--di|:disabled|
103
+ |--empty|--em|:empty|
104
+ |--enabled|--en|:enabled|
105
+ |--first-child|--fc|:first-child|
106
+ |--first-letter|--fl|::first-letter|
107
+ |--first-line|--fln|::first-line|
108
+ |--first-of-type |--fot|:first-of-type|
109
+ |--focus| --f or --fo|:focus|
110
+ |--focus-within| --fw|:focus-within|
111
+ |--focus-visible| --fv|:focus-visible|
112
+ |--file-selector-button| --fsb |::file-selector-button|
113
+ |--fullscreen| --fs |::fullscreen|
114
+ |--hover|--h or --ho|:hover|
115
+ |--has|--hs|:has|
116
+ |--hover-after|--haf|:hover::after|
117
+ |--hover-before|--hbf|:hover::before|
118
+ |--hover-target|--htg|:hover:target|
119
+ |--in-range|--ir|:in-range|
120
+ |--indeterminate|--ind|:indeterminate|
121
+ |--invalid|--inv|:invalid|
122
+ |--is|--is|:is|
123
+ |--lang|--lan|:lang|
124
+ |--last-child|--lc|:last-child|
125
+ |--last-of-type|--lot|:last-of-type|
126
+ |--link|--ln or -l|:link|
127
+ |--not-|--n-|:not|
128
+ |--nth-child-|--nc-|:nth-child|
129
+ |--nth-last-child-|--nlc-|:nth-last-child|
130
+ |--nth-last-of-type-|--nlot-|:nth-last-of-type|
131
+ |--nth-of-type-|--nthot-|:nth-of-type|
132
+ |--marker|--m|:marker|
133
+ |--only-of-type |--oot|:only-of-type|
134
+ |--only-child|--oc|:only-child|
135
+ |--optional|--op|:optional|
136
+ |--out-of-range|--oor|:out-of-range|
137
+ |--placeholder|--ph|::placeholder|
138
+ |--placeholder-shadow|--phs|::placeholder-shadow|
139
+ |--popover-open|--po|:popover-open|
140
+ |--read-only |--ro|:read-only|
141
+ |--read-write|--rw|:read-write|
142
+ |--required|--rq|:required|
143
+ |--root|--rt|:root|
144
+ |--selection|--s|::selection|
145
+ |--scrollbar|--sb|::-webkit-scrollbar|
146
+ |--webkit-scrollbar|--sb|::-webkit-scrollbar|
147
+ |--scrollbar-track|--st|::-webkit-scrollbar-track|
148
+ |--webkit-scrollbar-track|--st|::-webkit-scrollbar-track|
149
+ |--scrollbar-thumb|--stm|::-webkit-scrollbar-thumb|
150
+ |--webkit-scrollbar-thumb|--stm|::-webkit-scrollbar-thumb|
151
+ |--spelling-error|--se|::spelling-error|
152
+ |--target |--tg|:target|
153
+ |--user-invalid |--ui|:user-invalid|
154
+ |--valid|--va|:valid|
155
+ |--visited|--vi or- -v|:visited|
156
+ |--where|--w|:where|
131
157
 
132
158
  **Examples**
133
159
 
134
160
  | classname |shorthand | css |Remarks|
135
161
  |----------- |----------- |----------------------|------------|
136
- |`--hover-display-flex`|`-h-df`|`:hover{display: flex ;}`|
137
- |`--focus-list-style-none`|`-fo-lsn`|`:focus{list-style:none;}`|
138
- |`--nth-child-2n-margin-left20px`|`-nc-2n-ml20px`|`:nth-child(2n){margin-left:20px ;}`|
162
+ |`--hover-display-flex`|`--h-df`|`:hover{display: flex ;}`|
163
+ |`--focus-list-style-none`|`--fo-lsn`|`:focus{list-style:none;}`|
164
+ |`--nth-child-2n-margin-left-20px`|`--nc-2n-ml-20px`|`:nth-child(2n){margin-left:20px ;}`|
139
165
 
140
166
 
141
- #### Similary , we can also tell aliascss classname to use selector by using '_' at the begining class name . eg:-
167
+ #### Similarly , we can also tell aliascss classname to use selector by using '_' at the begin-ing class name . eg:-
142
168
  ```
143
- <div class="_h3-c-white _p-fs14px"" >
169
+ <div class="_h3-c-white _p-fs-14px"" >
144
170
  <h3>Hello World</h3>
145
171
  <p> Welcome to AliasCSS </p>
146
172
  </div>\
@@ -172,7 +198,7 @@ Or by using full semantic classnames
172
198
 
173
199
  To target Device , we can simply add device prefix at the very begening of classname. for eg:-
174
200
  ```
175
- <p class="xs-dn">This will not show in smmaler device</p>
201
+ <p class="xs-dn">This will not show in smaller device</p>
176
202
  ```
177
203
  or using semantic classname
178
204
  ```
@@ -182,20 +208,21 @@ or using semantic classname
182
208
  #### Device Guide Table
183
209
  |AliasCSS Device Prefix| CSS Selector|
184
210
  |--|--|
185
- |mob|@media (max-width : 768px) |
186
- |mobile|@media (max-width : 768px) |
187
- |tab|@media (min-width : 768px)|
188
- |lab|@media (min-width : 992px) |
189
- |desk|@media (min-width : 1200px) |
190
- |hd|@media (min-width : 1408px) |
191
211
  |print|@media print|
192
212
  |xs|@media (max-width : 576px) |
193
213
  |sm|@media (min-width : 576px) |
194
214
  |md|@media (min-width : 768px) |
195
215
  |lg|@media (min-width : 992px) |
196
216
  |xl|@media (min-width : 1200px)|
197
-
198
- >Any of the above prefix can be used, these prefix must be the at the begining of the classnames.
217
+ |xxl|@media (min-width : 1408px) |
218
+ |-xs| @media (min-width : 576px) |
219
+ |-sm|@media (max-width : 576px) |
220
+ |-md|@media (max-width : 768px) |
221
+ |-lg|@media (max-width : 992px) |
222
+ |-xl|@media (max-width : 1200px)|
223
+ |-xxl|@media (max-width : 1408px) |
224
+
225
+ >Any of the above prefix can be used, these prefix must be the at the begin-ing of the classnames.
199
226
  Few examples:-
200
227
 
201
228
  **Define**
@@ -208,7 +235,7 @@ Few examples:-
208
235
  **Compiled**
209
236
  ```
210
237
  @media (max-width : 768px) {
211
- .mob-flex-direction-column{
238
+ .xs-flex-direction-column{
212
239
  flex-direction: column ;
213
240
  }
214
241
  }
@@ -230,23 +257,23 @@ Few examples:-
230
257
  ```
231
258
  **Define**
232
259
  ```
233
- <div class="tab-width500px">...</div>
234
- //using shorthand <div class="tab-w500p">...</div>
260
+ <div class="md-width500px">...</div>
261
+ //using shorthand <div class="md-w500p">...</div>
235
262
  ```
236
263
 
237
264
  **Compiled**
238
265
  ```
239
266
  @media (min-width : 768px){
240
- .tab-width500px{
267
+ .md-width500px{
241
268
  width:500px ;
242
269
  }
243
270
  }
244
271
  ```
245
272
 
246
273
 
247
- # Classname Defination Guide
274
+ # Classname Definition Guide
248
275
  ##### Rules for defining classnames
249
- - In general every aliasCSS classnames are derived from css property and value we want to apply.i.e display-flex, color-red, wigth100px, margin-left2rem etc, similary short-hand classnames are also derived for first letter of property follwed by every first letter after '-'followed by first letter of value and evry first letter after '-' if it has any.
276
+ - In general every aliasCSS classnames are derived from css property and value we want to apply.i.e display-flex, color-red, width-100px, margin-left2rem etc, similarly short-hand classnames are also derived for first letter of property followed by every first letter after '-'followed by first letter of value and every first letter after '-' if it has any.
250
277
  For Example
251
278
  ```
252
279
  display:flex => df or display-flex
@@ -255,15 +282,15 @@ animation-timing-function: ease-in-out => atfeio or animation-timing-function-ea
255
282
  width:100px => w100px or width100px
256
283
  width:-100px => w-100px or width-100px
257
284
  ```
258
- > if there is '-' in classname before length or numeric unit it will treated as negative value. e.g w100px => width:100px , w-100px =>width:-100px , margin100px=> margin:100px, margin-100px => margin:-110px, fs-12px => font-size:-12px; fs12px=> font-size:12px; Becarefull when using '-' before numeric value.
259
- - Repace "." with d and "%" with p, note this only appicable to numeric and length unit . "d" must be between two numeric value. i.e d5 not != .5, use 0d5 => 0.5
285
+ > if there is '-' in classname before length or numeric unit it will treated as negative value. e.g w100px => width:100px , w-100px =>width:100px , margin-100px=> margin:100px, margin--100px => margin:-110px, fs-12px => font-size:-12px; fs-12px=> font-size:12px; Be care full when using '-' before numeric value.
286
+ - Replace "." with d and "%" with p, note this only applicable to numeric and length unit . "d" must be between two numeric value. i.e d5 not != .5, use 0d5 => 0.5
260
287
 
261
288
  |Acss|shorthand|Css|
262
289
  |--|--|--|
263
- |`margin0d75rem`|`m0d75rem`|`margin:0.75rem`|
264
- |`margin-0d75rem`|`m-0d75rem`|`margin:-0.75rem`|
265
- |`width50p`|` w50p`|`width:50%`|
266
- |`opacity0d5`|`o0d5`|`opacity:0.5`|
290
+ |`margin-0d75rem`|`m-0d75rem`|`margin:0.75rem`|
291
+ |`margin--0d75rem`|`m--0d75rem`|`margin:-0.75rem`|
292
+ |`width-50p`|` w-50p`|`width:50%`|
293
+ |`opacity-0d5`|`o-0d5`|`opacity:0.5`|
267
294
 
268
295
 
269
296
 
@@ -272,16 +299,16 @@ width:-100px => w-100px or width-100px
272
299
 
273
300
  | classname |shorthand | css |Remarks|
274
301
  |----------- |----------- |----------------------|------------|
275
- |`margin100px`|`m100px` | `margin:100px` | |
276
- |`margin1em` |`m1em` |`margin:1em`|
277
- |`margin50p` |`m50p` |`margin:50%` | Use 'p' for %|
278
- |`margin0d5rem`|`m0d5rem` |`margin:0.5rem` | use 'd' for .|
279
- |`margin20px30px20px40px`|`m20px30px20px40px`|` margin:20px 30px 20px 40px`|
280
- |`margin-20px30px-20px40px`|`m-20px30px-20px40px`| `margin:-20px 30px -20px 40px`|
302
+ |`margin-100px`|`m-100px` | `margin:100px` | |
303
+ |`margin-1em` |`m-1em` |`margin:1em`|
304
+ |`margin-50p` |`m-50p` |`margin:50%` | Use 'p' for %|
305
+ |`margin-0d5rem`|`m-0d5rem` |`margin:0.5rem` | use 'd' for .|
306
+ |`margin-20px-30px-20px-40px`|`m-20px-30px-20px-40px`|` margin:20px 30px 20px 40px`|
307
+ |`margin--20px-30px--20px-40px`|`m--20px-30px--20px-40px`| `margin:-20px 30px -20px 40px`|
281
308
  |`margin-left150px`|`ml150px`|`margin-left:150px`|
282
- |`border-radius15px`|br15px`|`border-radius:15px`|
283
- |`max-width500px`|`xw500pc`|`max-width:500px`|
284
- |`min-width300px`|`mw300p`|`min-width:300px`|
309
+ |`border-radius-15px`|`br-15px`|`border-radius:15px`|
310
+ |`max-width-500px`|`xw-500px`|`max-width:500px`|
311
+ |`min-width-300px`|`mw-300p`|`min-width:300px`|
285
312
  ---
286
313
  ## Color
287
314
  ### Color by name and Hexadecimal value
@@ -302,7 +329,7 @@ or,
302
329
 
303
330
  `syntax:[color|c]-[0-100]p[0-100]p[00-100]p`
304
331
  > RGB is represented by 3 digit [000-255] for each R G and B value, Incase of percentage 'p' should be used to represent '%'.
305
- Alpha can be represent by either decimal or percentage value, 'd' should be used in palce of ' . '.
332
+ Alpha can be represent by either decimal or percentage value, 'd' should be used in place of ' . '.
306
333
 
307
334
 
308
335
 
@@ -329,28 +356,28 @@ Alpha can be represent by either decimal or percentage value, 'd' should be used
329
356
  #### `border`
330
357
  |classname|shorthand|css|Remarks|
331
358
  |---------|---------|---|-------|
332
- |`border1px-solid-red`|`b1px-s-red`|`border:1px solid red`|
333
- |`border1px-solid-30p40p50p`|`b2px-s-30p40p50p`|`border:1px solid rgb(30%,40%,50%)`|
334
- |`border-bottom2px-dashed-cccccc`|`bb2px-ds-cccccc`|`border-bottom:2px dashed #cccccc`|
359
+ |`border-1px-solid-red`|`b-1px-s-red`|`border:1px solid red`|
360
+ |`border-1px-solid-30p40p50p`|`b-2px-s-30p40p50p`|`border:1px solid rgb(30%,40%,50%)`|
361
+ |`border-bottom-2px-dashed-cccccc`|`bb-2px-ds-cccccc`|`border-bottom:2px dashed #cccccc`|
335
362
 
336
363
  #### `border-radius`
337
364
 
338
365
  |classname|shorthand|css|Remarks|
339
366
  |---------|---------|---|-------|
340
- |`border-radius5px`|`br5px`|`border-radius:5px`|
341
- |`border-radius10px5px`|`br10px5px`|`border-radius:10px 5px`|
342
- |`border-radius5px10px30px4px`|`br5px10px30px4px`|`border-radius:4px 10px 30px 4px`|
343
- |`border-bottom-left-radius5px60px`|`bblr5px60px`|` border-bottom-left-radius:5px 60px ;`|
344
- |`border-top-right-radius6p`|`btrr6p`|` border-top-right-radius:6% ;`|
367
+ |`border-radius-5px`|`br-5px`|`border-radius:5px`|
368
+ |`border-radius-10px-5px`|`br-10px-5px`|`border-radius:10px 5px`|
369
+ |`border-radius-5px-10px-30px-4px`|`br-5px-10px-30px-4px`|`border-radius:4px 10px 30px 4px`|
370
+ |`border-bottom-left-radius-5px-60px`|`bblr-5px-60px`|` border-bottom-left-radius:5px 60px ;`|
371
+ |`border-top-right-radius-6p`|`btrr-6p`|` border-top-right-radius:6% ;`|
345
372
 
346
373
  #### `box-shadow`
347
374
 
348
375
  |classname|shorthand|css|Remarks|
349
376
  |---------|---------|---|-------|
350
- |`box-shadow1px2px3px4px-pink`|`bxs1px2px3px4px-pink`|`box-shadow:1px 2px 3px 4px pink`|
351
- |`box-shadow0px2px-000000000`|`bxs0px2px-000000000`|`box-shadow:0px 2px rgb(000,000,000)`|
352
- |`box-shadow-2px-2px-cccccc`|`bxs-2px-2px-cccccc`|`box-shadow:-2px -2px #cccccc`|
353
- |`box-shadow0px2px-000000000--2px5px1px-red`|`bxs0px2px-000000000----2px5px1px-red`|`box-shadow:0px 2px rgb(000,000,000),2px 5px 1px red`|Multiple Box-shadow|
377
+ |`box-shadow-1px2px3px4px-pink`|`bxs-1px-2px-3px-4px-pink`|`box-shadow:1px 2px 3px 4px pink`|
378
+ |`box-shadow-0px-2px-000000000`|`bxs-0px-2px-000000000`|`box-shadow:0px 2px rgb(000,000,000)`|
379
+ |`box-shadow--2px--2px-cccccc`|`bxs--2px--2px-cccccc`|`box-shadow:-2px -2px #cccccc`|
380
+ |`box-shadow-0px-2px-0px-000000000__2px-5px-1px-red`|`bxs-0px-2px-0px-000000000__2px-5px-1px-red`|`box-shadow:0px 2px 0px rgb(000,000,000),2px 5px 1px red`|Multiple value for Box-shadow|
354
381
  ---
355
382
  ## Fonts
356
383
  |classname|shorthand|css|Remarks|
@@ -364,71 +391,73 @@ Alpha can be represent by either decimal or percentage value, 'd' should be used
364
391
  ## Transform
365
392
  |classname|shorthand|css|Remarks|
366
393
  |---------|---------|---|-------|
367
- |`transform-rotate45deg`|`tf-r45deg`|`transform:rotate(45deg)`|
368
- |`transform-scale2--rotate25deg`|`tf-s2--r25deg`|`transform:scale(2) rotate(25deg)`| Multiple value|
369
- |`transform-rotate45deg`|`tf-r45deg`|`transform:rotate(45deg)`|
370
- |`transform-rotate3d1_-1_1_45deg`|`tf-r3d1_-1_1_45deg`|`transform:rotate3d(1, -1, 1, 45deg)`|
371
- |`transform-matrix0d8_0d7_-0d8_0.866_0_0`|`tf-m0d8_0d7_-0d8_0.866_0_0`|`transform:matrix(0.8, 0.7, -0.8, 0.866, 0, 0)`||
372
- |`transform-rotateX45deg`|`tf-rx45deg`|`transform:rotateX(45deg)`|
373
- |`transform-rotate45deg`|`tf-r45deg`|`transform:rotate(45deg)`|
374
- |`transform:-scaleX2`|`tf-sx2`|`transform:scaleX(2)`|
375
- |`transform-skew45deg_-45deg`|`tf-sk45deg`|`transform:skew(45deg, -45deg)`|
376
- |`transform-translate20px_10px`|`tf-t20px_10px`|`transform:translate(20px, 10px)`|
377
- |`transform-rotate45deg`|`tf-r45deg`|`transform:rotate(45deg)`|
378
- |`transform-rotate45deg`|`tf-r45deg`|`transform:rotate(45deg)`|
394
+ |`transform-rotate-45deg`|`tf-r-45deg`|`transform:rotate(45deg)`|
395
+ |`transform-scale-2__rotate-25deg`|`tf-s2__r-25deg`|`transform:scale(2) rotate(25deg)`| Multiple value|
396
+ |`transform-rotate--45deg`|`tf-r--45deg`|`transform:rotate(-45deg)`|
397
+ |`transform-rotate3d-1--1-1-45deg`|`tf-r3d-1--1-1-45deg`|`transform:rotate3d(1, -1, 1, 45deg)`|
398
+ |`transform-matrix-0d8-0d7--0d8-0.866-0-0`|`tf-m-0d8-0d7--0d8-0.866-0-0`|`transform:matrix(0.8, 0.7, -0.8, 0.866, 0, 0)`||
399
+ |`transform-rotateX-45deg`|`tf-rx-45deg`|`transform:rotateX(45deg)`|
400
+ |`transform-rotate-45deg`|`tf-r-45deg`|`transform:rotate(45deg)`|
401
+ |`transform:-scaleX-2`|`tf-sx-2`|`transform:scaleX(2)`|
402
+ |`transform-skew-45deg--45deg`|`tf-sk-45deg--45deg`|`transform:skew(45deg, -45deg)`|
403
+ |`transform-translate-20px-10px`|`tf-t-20px-10px`|`transform:translate(20px, 10px)`|
404
+ |`transform-rotate-45deg`|`tf-r-45deg`|`transform:rotate(45deg)`|
405
+ |`transform-rotate-45deg`|`tf-r-45deg`|`transform:rotate(45deg)`|
379
406
 
380
407
  ## Transition
381
408
 
382
409
  |classname|shorthand|css|Remarks|
383
410
  |---------|---------|---|-------|
384
- |`transition-all0d5s`|`tn-all0d5s` |`transition:all 0.5s`|
385
- |`transition-width0d35s`|`tn-width0d35s` |`transition:width 0.5s`|
386
- |`transition-width-0d35s`|`tn-width-0d35s` |`transition:width 0.5s`| '-' used before numeric time unit will not taken as negative value
387
- |`transition-transform0d35s`|`tn-transform0d35s`|`transition:transform 0.35s`|
411
+ |`transition-all-0d5s`|`tn-all-0d5s` |`transition:all 0.5s`|
412
+ |`transition-width-0d35s`|`tn-width-0d35s` |`transition:width 0.5s`|
413
+ |`transition-width-0d35s`|`tn-width-0d35s` |`transition:width 0.5s`|
414
+ |`transition-transform-0d35s`|`tn-transform-0d35s`|`transition:transform 0.35s`|
388
415
 
389
416
  ## Filter
390
417
 
391
418
  |classname|shorthand|css|Remarks|
392
419
  |---------|---------|---|-------|
393
- |`filter-blur4px`|`fl-b4px`|`filter:blur(4px)`||
420
+ |`filter-blur-4px`|`fl-b-4px`|`filter:blur(4px)`||
394
421
  |`filter-unset`|`flu`|`fliter:unset`||
395
- |`filter-brightness50p--blur4px--invert50p`|`fl-br50p--b4px--i50p`|`filter:brightness( 50% ) blur( 4px ) invert( 50% )` |
422
+ |`filter-brightness-50p__blur-4px__invert-50p`|`fl-br-50p__b-4px__i-50p`|`filter:brightness( 50% ) blur( 4px ) invert( 50% )` |
396
423
  |`filter-drop-shadow8px8px10px-gray`|`fl-ds8px8px10px-gray`|`filter:drop-shadow( 8px 8px 10px gray )`||
397
- |`filter-hue-rotate40deg`|`fl-hr40deg`|`filter:hue-rotate( 40deg )`||
424
+ |`filter-hue-rotate-40deg`|`fl-hr-40deg`|`filter:hue-rotate( 40deg )`||
398
425
 
399
426
  ## Gradient
400
427
  |classname|shorthand|css|Remarks|
401
428
  |---------|---------|---|-------|
402
429
  |`background-linear-gradient-red-blue`|`bg-lg-red-blue `|`background:linear-gradient( red, blue ) `||
403
- |`background-linear-gradient-red_10p-blue_90p`|`bg-lg-red_10p-blue_20p `|`background:linear-gradient( red 10%, blue 90% )`||
404
- |`background-repeating-linear-gradient-red_10p-blue_90p`|`bg-rlg-red_10p-blue_20p `|`background:repeating-linear-gradient( red 10%, blue 90% )`||
405
- |`background-linear-gradient-to-right-red_10p-blue_90p`|`bg-lg-tr-red_10p-blue_90p `|`background:linear-gradient(to right, red 10%, blue 90% )`||
406
- |`background-linear-gradient45deg-red_10p-blue_90p`|`bg-lg45deg-red_10p-blue_90p `|`background:linear-gradient(45deg, red 10%, blue 90% )`||
407
- |`background-radial-gradient-red_10p-blue_90p`|`bg-rg-red_10p-blue_90p `|`background:radial-gradient( red 10%, blue 90% )`||
408
- |`background-repeating-radial-gradient-circle-blue_5p-skyblue_23p `|`bg-rrg-circle-blue_5p-skyblue_23p `|`background:repeating-radial-gradient( circle, blue 5%, skyblue 23% )`||
430
+ |`background-linear-gradient-red-10p-blue-90p`|`bg-lg-red-10p-blue-20p `|`background:linear-gradient( red 10%, blue 90% )`||
431
+ |`background-repeating-linear-gradient-red-10p-blue-90p`|`bg-rlg-red-10p-blue-20p `|`background:repeating-linear-gradient( red 10%, blue 90% )`||
432
+ |`background-linear-gradient-to-right-red-10p-blue-90p`|`bg-lg-tr-red-10p-blue-90p `|`background:linear-gradient(to right, red 10%, blue 90% )`||
433
+ |`background-linear-gradient45deg-red-10p-blue-90p`|`bg-lg45deg-red-10p-blue-90p `|`background:linear-gradient(45deg, red 10%, blue 90% )`||
434
+ |`background-radial-gradient-red-10p-blue-90p`|`bg-rg-red-10p-blue-90p `|`background:radial-gradient( red 10%, blue 90% )`||
435
+ |`background-repeating-radial-gradient-circle-blue-5p-skyblue-23p `|`bg-rrg-circle-blue-5p-skyblue-23p `|`background:repeating-radial-gradient( circle, blue 5%, skyblue 23% )`||
409
436
  |`background-conic-gradient-red-blue`|`bg-cg-red-blue `|`background:conic-gradient( red, blue ) `||
437
+ |`background-linear-gradient-top-right-red-10p-blue-90p__radial-gradient-center-yellow-blue`|`bg-lg-tr-red-10p-blue-90p__rg-center-yellow-blue `|`background:linear-gradient(top right, red 10%, blue 90% ),radial-gradient( center, yellow, blue )`|multiple|
410
438
 
411
439
  ## CSS Variable
412
440
  |classname|shorthand|css|Remarks|
413
441
  |---------|---------|---|-------|
414
442
  |`color--var--name`|`c--var--name`|`color: var(--name)`|
415
- |`width--var--side-bar-width`|`w--var--side-bar-width`| `width: var(--side-bar-width)`||
443
+ |`color--name`|`c--name`|`color: var(--name)`|
444
+ |`width--side-bar-width`|`w--side-bar-width`| `width: var(--side-bar-width)`||
416
445
 
417
446
 
418
447
  # NPM Guide
419
448
 
420
449
  With `npm` version there are lots of exrta front-end / workflow feature we can use out of the box.
421
450
 
422
- `npm intstall aliascss`
451
+ `npm install --save-dev aliascss`
423
452
 
424
453
 
425
454
  To Compiler folder from command line
426
455
 
427
- `npx aliascss 'public/*.html' 'public/css/acss.ccc'`
456
+ `npx aliascss 'public/*.html' 'public/css/acss.css'`
428
457
 
429
458
  > output css file must be there if not it should be created manully.
430
459
 
431
- >Guide-`npx aliascsss 'glob-patterm' 'path/to/output/style.css'`
460
+ >Guide-`npx aliascss 'input/glob-pattern/**.*' 'path/to/output/style.css'`
432
461
 
433
462
  ### Watch for files
434
463
 
@@ -446,74 +475,133 @@ To Compiler folder from command line
446
475
 
447
476
  ```
448
477
 
449
- ## .aliascss.config.js
450
- `.aliascss.config.js` gives you more feature and power to the workflow.
478
+ ## aliascss.config.js
479
+ `aliascss.config.js` gives you more feature and power to the workflow.
451
480
 
452
- @.aliascss.config.js
453
481
 
454
- Basic structure of config file
455
- ```
456
- export let config= {
457
- //input files in glob pattern to get compiled
458
- input:'public/*.html',
482
+ Basic structure of aliascss.config.js file
483
+
484
+ ```javascript copy showLineNumbers filename="aliascss.config.js"
485
+ const config= {
486
+ // input glob pattern or array of glob pattern
487
+ input:['app/**/*.(tsx|jsx)', 'components/**/*.(tsx|jsx)','public/*.html'],
488
+
489
+ // Output css file , file must exist or should be created manully if file doesnot exist
490
+ output:{
491
+ // path to main/master css file which include every compiled css declaration for given input
492
+ location:'./public/css/acss.css',
493
+ "--file":true// output css file for each file
494
+ },
495
+
496
+ //---------------Below this are all optional -------------------------
497
+ // Customize media prefix selector
498
+ media:{
499
+ prefix:{
500
+ xs:'@media (max-width : 600px)'
501
+ }
502
+ },
503
+ // support for css Module
504
+ '--module':true,
505
+
506
+ // import module as i.e import x form 'page.module.css'
507
+ importModuleAs:'x',
508
+
509
+ // uncomment minify is true if you want main css file to be minified by cssnano
510
+
511
+ // minify:true,
459
512
 
460
- //Output css file , must exist or should be created manully if not exist
461
- output:'./public/css/acss.css',
513
+ // name of extractorFunction
514
+ extractorFunction:"x",
515
+
516
+ // prefix aliascss ac-bgc-red ac--hover-color-red
517
+ // prefix:'ac',
462
518
 
463
519
  //Truncate the css file , you should let it true unless you know what your are doing
464
520
  truncate:true,
465
- //input glob patterns, can be array of folder or files or both,
466
-
467
- //
521
+
522
+ //ADD Custom color Value
468
523
  custom:{
469
- color:{
524
+ colors:{
525
+ //custom name for color value must not have "-" or "_" to work perfectly.
470
526
  'main':"rgb(12,23,45)",// now you can use bgc-main
471
527
  'theme':'#c6c6c6'
472
528
 
473
- },
474
- length:{
475
- '1cv':'25%'
476
529
  }
477
530
 
478
531
  },
479
- // predine classname and
480
- extend:{
481
- //in browser-mode you can simply group class="c-blue" acss-group="color-primary"
482
- 'outline-color':'color: blue',
483
- //now you can use it with device or seduo --hover-outline-color
484
- },
485
- //if you want to add some css statement
532
+ // Create your own compiler
533
+ extend:{
534
+ 'font-size':{
535
+ alias:'fs',
536
+ values:["2rem:xl"],
537
+ compiler:(value)=>{
538
+ return value;
539
+ }
540
+ },
541
+ 'txt-color':{
542
+ proerty:'color',
543
+ extend:'color' // now you can use txt-color in place color
544
+ },
545
+
546
+ // Now you can use shadow as className property e.g shadow-xs
547
+ 'shadow':{
548
+ property:'box-shadow',
549
+ compiler:(value)=>{
550
+ value=value.slice(1);
551
+ const values={
552
+ '3xl': ' 0px 32px 64px -12px var(--shadow-color)',
553
+ 'xxxl': ' 0px 32px 64px -12px var(--shadow-color)',
554
+ '2xl': ' 0px 24px 48px -12px var(--shadow-color)',
555
+ 'xxl': ' 0px 24px 48px -12px var(--shadow-color)',
556
+ 'xl': ' 0px 20px 24px -4px var(--shadow-color)',
557
+ 'lg': ' 0px 12px 16px -4px var(--shadow-color)',
558
+ 'md': ' 0px 4px 8px -2px var(--shadow-color)',
559
+ 'sm': ' 0px 1px 3px var(--shadow-color)',
560
+ 'xs': ' 0px 1px 2px var(--shadow-color)',
561
+ };
562
+ if(values.hasOwnProperty(value)) return values[value];
563
+ }
564
+
565
+ }
566
+ },
567
+ // predefine className
568
+ prebuild:{
569
+
570
+ 'text-xl': 'font-size:20px;line-height:30px',
571
+ 'text-lg': 'font-size:18px;line-height:28px',
572
+ 'text-md': 'font-size:16px;line-height:24px',
573
+ 'text-sm': 'font-size:14px;line-height:20px',
574
+ 'text-xs': 'font-size:12px;line-height:18px',
575
+
576
+ 'radius-xs':'border-radius:4px',
577
+
578
+ 'flex-center':'display:flex;align-items:center;justify-content:center',
579
+ },
580
+ //Add some css statement in every compiled css file
486
581
  statement:`
487
582
  :root{
488
- --bg-color: teal;
583
+ --bg-dark-color:rgba(111,111,111,1) ;
584
+ --bg-light-color:rgba(21,21,21,1) ;
489
585
  --outline-color:blue;
490
- --col-1:8.33%
491
- --col-2:calc(var(--col-1)*2)
492
- --col-3:calc(var(--col-1)*3)
493
- --col-4:calc(var(--col-1)*4)
494
- --col-5:calc(var(--col-1)*5)
495
- --col-6:50%
496
- --col-8:calc(var(--col-1)*8)
497
- --col-12:100*
586
+
498
587
  }
499
588
 
500
589
  body{
501
- font:BlinkMacSystemFont , -apple-system , "Segoe UI" , Roboto , Oxygen , Ubuntu , Cantarell , "Fira Sans" , "Droid Sans" , "Helvetica Neue" , Helvetica , Arial , sans-serif , "Apple Color Emoji" , "Segoe UI Emoji" , "Segoe UI Symbol" , "Noto Color Emoji";
590
+ font-family:BlinkMacSystemFont , -apple-system , "Segoe UI" ;
502
591
  }
503
592
 
504
593
  `,
505
594
 
506
- // group classname in single classname
595
+ // pre group valid Aliascss classNames in single className
507
596
  group:{
508
- 'container':'p15px border1px-solid-light',
509
- 'row':'--hover-filter-blur1px '
597
+ 'container':' df fdc bsbb aic flex-shrink-1 flex-grow-1 ',
598
+ 'section':'flex-shrink0 bsbb'
510
599
  },
511
- //if some of the classname collide with other CSS framework like bootstrap and tailwindcss
512
- //You wanna tell aliasccss to ignore it...
513
- ignore:['fs12px', 'c-red'],
514
-
515
-
600
+ // if some of the className collide with other CSS framework like bootstrap and tailwindcss
601
+ // You wanna tell aliascss to ignore it...
602
+ ignore:['fs12px', 'c-red'],// these classnames will be ignored
516
603
  }
604
+ export default config;
517
605
  ```
518
606
 
519
607
  Now you can do,
@@ -525,7 +613,8 @@ Now you can do,
525
613
  `npx aliascss --config --watch`
526
614
 
527
615
  @package.json
528
- ```
616
+
617
+ ```JSON
529
618
  ....
530
619
  "scripts": {
531
620
  ...
@@ -536,7 +625,7 @@ Now you can do,
536
625
 
537
626
  ```
538
627
 
539
-
628
+ Visit for more..[https:aliascss.com](Offical Documentation site)
540
629
 
541
630
 
542
631