tomokimiyauci / mapcss Goto Github PK
View Code? Open in Web Editor NEWTiny, composable Atomic CSS engine
Home Page: https://mapcss.miyauchi.dev
License: MIT License
Tiny, composable Atomic CSS engine
Home Page: https://mapcss.miyauchi.dev
License: MIT License
Assuming asynchronous has the following advantages
{
cssMap: {
dynamic:
(async () => import("source.json", { assert: { type: "json" } }));
}
}
generate
transform
Redesign cssMap to be only object literals, which are easier to declare.
Treat "" (empty) and $DEFAULT
properties as special keys
When I build a certain component, it hangs.
Probably occurs when using global variables, and occur memory leak.
Since it is not possible to deploy automatically by CI/CD, substitute the component in question.
It must convert number/length css data type only
preset_tw includes injecting custom property.
if in production, the minifier compress " "
string to empty.
custom variable of empty string is invalid data type.
The build process to npm may distribute the deps source to multiple sources.
Therefore, equivalence checking by instanceof may produce unexpected results.
Although named type export has been supported since Deno 14, it may be too early to use it.
Since it is not available in Aleph.js, it is temporarily refactored.
generate
function should accept user defined extract function
presetSvg, presetTw
Expected:
1..i-mdi-icon
2..w-4
preset_svg mapped unmatched token
avoid duplication of property, remove vendor prefix from preset css definition
Refer to semver, v
prefix is invalid versioning.
pure postcss module is not universal.
content with quote does not work
<div class="content-['']"></div>
import { presetTw } from "https://esm.sh/@mapcss/preset-tw@beta";
import { presetTypography } from "https://esm.sh/@mapcss/preset-typography@beta";
import { simpleExtractor } from "https://esm.sh/@mapcss/config@beta";
import type { Config } from "config";
/** You can try the following features:
* - Chrome 80+
* - iOS Safari 15+
* - Other browsers that support module workers
*/
// import { presetSVG, iconifyJSON } from "https://esm.sh/@mapcss/preset-svg@beta"
// import mdi from "https://esm.sh/@iconify-json/mdi/icons.json" assert {
// type: "json",
// };
// import autoprefixer from "https://esm.sh/autoprefixer"
export default <Config> {
separator: "-",
variablePrefix: "map-",
extractor: simpleExtractor,
preset: [
presetTw({
darkMode: "class",
}),
presetTypography({
css: {
p: false,
a: {
textDecoration: false,
color: false,
},
},
}),
// presetSVG({
// mdi: iconifyJSON(mdi)
// })
],
minify: false,
// postcssPlugin: [autoprefixer]
};
.content-\[\'\'\]{
--map-content: '';
content: var(--map-content);
}
no emit
v1.0.0-beta.50
npm
Chrome 99.0.4844.74
No response
Injected CSS should not be subject to the default orderStatement
.
Reordering should only be applied to uncontrollable mapped CSS.
generate
function accept token only
From the standpoint of compatibility and versatility, the role of mapcss is to be the interface for conversion to AST.
mapping rule -> plain object -> AST -> CSS
The order is preset CSS, user defined CSS, mapped CSS
mapcss is monorepo. as monorepo, remove single entry point
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.