Bot releases are visible (Hide)
Published by github-actions[bot] about 1 year ago
Master CSS ESLint dfb66ee 91bce44 @0Miles
npm install -D @master/eslint-plugin-css @typescript-eslint/parser eslint
{
"extends": ["@master/css"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js"],
"parser": "@typescript-eslint/parser"
}
]
}
Now you can keep the order of category names consistent and more features coming in the future.
Config
c25b482 @1aron
CoreLayer
enum bbb30c6 @1aron
Layer
enum 7d1197a @1aron
config.rules[].match
8b48d8c @1aron
config.semantics
instead of camelCase 1273454 @1aron
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Register the theme service using ThemeServiceProvider
f4dfaca @BenSeage
<script setup lang="ts">
import { CSSProvider, ThemeServiceProvider } from '@master/css.vue'
import config from '../master.css'
import HelloWorld from "./components/HelloWorld.vue";
</script>
<template>
<CSSProvider :config="config">
<ThemeServiceProvider :options="{ default: 'system' }">
<HelloWorld />
</ThemeServiceProvider>
</CSSProvider>
</template>
and access the theme context:
<script setup lang="ts">
import { ref, inject } from 'vue'
const count = ref<number>(0)
const themeService = inject<any>('theme-service')
function changeTheme(event: any) {
themeService.switch(event.target.value)
}
</script>
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
CSSProvider
registration 2b05b35 @1aron
Published by github-actions[bot] about 1 year ago
Rename config.breakpoints
to config.viewports
and add the viewport 4xs
d766c3f by @1aron
export default {
- breakpoints: {
- '3xs': 360,
- '2xs': 480,
- xs: 600,
- sm: 768,
- md: 1024,
- lg: 1280,
- xl: 1440,
- '2xl': 1600,
- '3xl': 1920,
- '4xl': 2560
- },
+ viewports: {
+ '4xs': 360,
+ '3xs': 480,
+ '2xs': 600,
+ 'xs': 768,
+ 'sm': 834,
+ 'md': 1024,
+ 'lg': 1280,
+ 'xl': 1440,
+ '2xl': 1600,
+ '3xl': 1920,
+ '4xl': 2560
+ }
}
Rename config.keyframes
to config.animations
#268 2895a1c by @BenSeage
export default {
- keyframes: {
+ animations: {
slideIn: { to: { ... }, from: { ... } }
}
}
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
Semantic fit
= width:fit
+ height:fit
#257 a199e34 by @BenSeage
- <div class="w:fit h:fit">
+ <div class="fit">
Selector shorthand :only
for :only-child
#266 371b83d by @BenSeage
<ul>
- <li class="hide:only-child"></li>
+ <li class="hide:only"></li>
</ul>
border
and outline
default to solid
when style
is not specified #267 4aea676 @BenSeage
- <div class="border:1|solid|slate">
+ <div class="border:1|slate">
- <div class="outline:1|solid|slate">
+ <div class="outline:1|slate">
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
init()
function to initialize ThemeService
more concisely 1cc98fc by @1aron
import { init } from 'theme-service'
init({ default: 'dark' })
Made color config syntax consistent with class syntax #264 20fa8fc by @benseage
export default {
colors: {
primary: '#000',
primary: 'rgb(0,0,0)',
- primary: 'rgb(0 0 0)',
+ primary: 'rgb(0|0|0)',
- primary: 'rgb(0 0 0/.5)',
+ primary: 'rgb(0|0|0/.5)',
primary: 'rgba(0,0,0,.5)',
primary: 'blue/.5'
}
}
Specify multiple theme colors on a single prop #263 af8b3f1 by @benseage
export default {
colors: {
- primary: {
- '': '#ff0000'
- '@light': '#000000',
- '@dark': '#ffffff'
- },
- accent: {
- '': '#ff3300'
- '@light': '#111111',
- '@dark': '#eeeeee'
- }
+ primary: '#ff0000 #000000@light #ffffff@dark',
+ accent': '#ff3300 #111111@light #eeeeee@dark'
}
}
Cannot find module 'src/core' from 'src/functions/init.ts'
a66cf2f by @benseage
options.init
in favor of manual initialization cbea12e by @1aron
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
( ↑ Expand all the release details )
Compilation modes have been renamed:
You can now initialize the Master CSS Runtime Rendering using CSSProvider
:
<script setup lang="ts">
import { CSSProvider } from '@master/css.vue'
import config from '../master.css'
</script>
<template>
<CSSProvider :config="config">...</CSSProvider>
</template>
Or lazy load the Runtime Engine for Progressive Rendering: CSSProvider
:
<script setup lang="ts">
import { defineAsyncComponent } from 'vue'
const CSSProvider = defineAsyncComponent(async () => (await import('@master/css.vue')).CSSProvider)
</script>
<template>
<CSSProvider :config="import('../master.css')">...</CSSProvider>
</template>
config.extends
multiple configurations #180 5b080ae
// master.css.js
export default {
extends: [
require('aron.css'),
require('@master/tailwind.css'),
require('./styles/btn.css')
],
colors: { ... },
...
}
Fallback invalid at-rules @.*
to be themes #214 836e702
<div class="fg:red@christmas">
Generated CSS:
.christmas .fg\:red\@christmas {
color: #d11a1e
}
Support semantics and rules with animation keyframes #222 f2f8b87
// master.css.js
export default {
semantics: {
'my-animation': {
animation: '1s linear infinite rotate'
}
}
}
Integrate Class Variant using React elements #191 277ee1d
// React
import { styled } from '@master/css.react';
const Link = styled.a`text:center px:20`
return (
<Link href="https://css.master.co/">Master CSS</Link>
)
@master/css-validator
- Validator for Master CSS class syntax 73bfec1
import { isClassValid, reportErrors, createValidRules } from '@master/css-validator'
isClassValid('text:center')
// => true
isClassValid('love:css')
// => false
createValidRules('text:center')
// => [{...}]
createValidRules('love:css')
// => []
reportErrors('text:center')
// => []
reportErrors('love:css')
// => [SyntaxError]
@master/css-extractor
- Master CSS static extractor for various raw text 2f51401
- npm uninstall @master/css-compiler
+ npm install @master/css-extractor
$ mcss extract
@master/css-extractor.vite
- Integrate Master CSS Static Extraction in Vite way f461c83
- npm uninstall @master/css.vite
+ npm install @master/css-extractor.vite
import { defineConfig } from 'vite'
- import { MasterCSSExtractorPlugin } from '@master/css.vite'
+ import { CSSExtractorPlugin } from '@master/css-extractor.vite'
export default defineConfig({
plugins: [
- MasterCSSExtractorPlugin(),
+ CSSExtractorPlugin()
]
})
@master/css-extractor.webpack
761b902
- npm uninstall @master/css.webpack
+ npm install @master/css-extractor.webpack
- const { MasterCSSExtractorPlugin } = require('@master/css.webpack')
+ const { CSSExtractorPlugin } = require('@master/css-extractor.webpack')
+ /** @type {import('webpack').Configuration} */
+ const webpackConfig = {
+ plugins: [
+ new CSSExtractorPlugin()
+ ]
+ }
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
- config.plugins.push(new MasterCSSExtractorPlugin())
+ config.plugins.push(...webpackConfig.plugins)
return config
}
}
module.exports = nextConfig
@master/css-server.nitro
- Integrate Master CSS Progressive Rendering in Nitro way 72061c4
// nuxt.js-with-progressive-rendering/server/plugins/css-server.ts
import { createCSSServerPlugin } from '@master/css-server.nitro'
// @ts-expect-error allowImportingTsExtensions
import config from '../../master.css.ts'
export default createCSSServerPlugin({ config })
@master/css-renderer
85d82a7
$ mcss render ".next/**/*.html"
import cv from 'class-variant'
const btn = cv(
'inline-flex rounded',
{
intent: {
primary: 'bg:blue fg:white bg:blue-55:hover',
secondary: 'bg:white fg:slate-30 bg:slate-90:hover',
},
size: {
sm: 'text:14 p:5|15',
md: 'text:16 p:10|25'
}
},
['uppercase', { intent: 'primary', size: 'md' }],
({ indent, size }) => indent && size && 'font:semibold'
)
btn.default = {
intent: 'primary',
size: 'sm'
}
export default btn
import btn from './class-variants/btn'
btn()
// inline-flex rounded bg:blue fg:white bg:blue-55:hover text:14 p:5|8 font:semibold
btn({ indent: 'secondary', size: 'sm' })
// inline-flex rounded bg:white fg:slate-30 bg:slate-90:hover text:14 p:5|8 font:semibold
btn({ indent: 'primary', size: 'md' })
// inline-flex rounded bg:blue fg:white bg:blue-55:hover text:16 p:10|25 uppercase font:semibold
Supports Boolean properties #247 c3bed63
import cv from 'class-variant'
const btn = cv(
'inline-flex',
{
disabled: 'opacity:.5'
}
)
btn({ disabled: true })
// => inline-flex opacity:.5
csstree
instead of stylelint
, 10x-60x faster than everextractClassesFromHTML()
function e8f80b6
extractLatentClasses()
function 3b89074
generateFromClasses()
function 49cf346
generateFromHTML()
function 8c6dc60
mcss render '**/*.html' --analyze
mode e9f14ca
renderHTML()
function 37ee2f3
mcss render
log brotil sized and rendered files #205 fe1b598
Initialization of Master CSS Runtime #249 493e091
- import MasterCSS from '@master/css'
+ import { initRuntime } from '@master/css'
import config from './master.css'
- new MasterCSS(config)
+ initRuntime(config)
Specify theme variants in each config options #213 c912f70
// master.css.js
export default {
colors: {
- primary: '#ff0000'
+ primary: '#ff0000 #ffffff@dark #000000@light'
},
- themes: {
- light: {
- colors: {
- primary: '#000000'
- }
- },
- dark: {
- colors: {
- primary: '#ffffff'
- }
- }
- }
}
Add options.exclude
d93dc68
Exclude dev sources 3e3e3d9
Virtual CSS mods are prefixed with virtual:
by default to avoid confusion with real mods #200 d608e26
- import 'master.css'
+ import '.virtual/master.css'
Built-in handling of changes to options, configurations, and sources 6560182
index.html
according to transformIndexHtml
8ebe612
browser
package 1bf520e
toString
as a valid class 92ef89c
options
accessible across environments fcb38d5
vite build
e1ad44e
master.css.*
config or master.css-extractor.*
options ec284ef
master.css.js
e9f9f3c
Module not found: Can't resolve '.virtual/master.css'
d20d087
CSSProvider
Types b1707c9
Rename render()
to generateFromClasses()
130d360
Rename renderFromHTML()
to generateFromHTML()
184c170
Rename renderIntoHTML()
to renderHTML()
e345e44
renderRules()
1c11b2c
renderRulesFromHTML()
625945e
Deprecate sm:
, sp:
collision-prone syntax 7d32952
- <div class="sm:20 smx:32 sp:16 spx:48">
+ <div class="scroll-m:20 scroll-mx:32 scroll-p:16 scroll-px:48">
@master/css-extractor
instead of @master/css-compiler
bfde550
new CSSExtractor({}, cwd)
instead of new CSSExtractor({ cwd })
f4da0a2
CSSProvider
instead of LazyCSSProvider
9bd0c72
@master/css-extractor.vite
instead of @master/css.vite
9b4e443
@master/css-extractor.webpack
instead of @master/css.webpack
626ee89
virtual:
by default to avoid confusion with real mods #200 》 and prefix with .virtual:
e6a6698, #200
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
CSS - Simplify animation-play-state:
to @play:
#223 e01886d
- <div class="animation-play-state:paused">
- <div class="animation-play-state:running">
+ <div class="@play:paused">
+ <div class="@play:running">
CSS - Simplify animation-direction
values #220 a70f8c0
- <div class="animation-direction:alternate">
- <div class="animation-direction:alternate-reverse">
+ <div class="@direction:alt">
+ <div class="@direction:alt-reverse">
CSS - Simplify animation-fill-mode
#228 e5d2fe5
- <div class="animation-fill-mode:forwards">
- <div class="animation-fill-mode:backwards">
- <div class="animation-fill-mode:both">
+ <div class="@fill:forwards">
+ <div class="@fill:backwards">
+ <div class="@fill:both">
CSS - Simplify animation-iteration-count
#227 8c65635
- <div class="animation-iteration-count:infinite">
+ <div class="@iteration:infinite">
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
matchMedia is not defined
e185afd