![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Use W3C CSS Level 4 Modules Today with PostCSS. Take advantage of future techniques like variables, custom selectors, color functions, and new pseudo selectors.
npm i --save-dev level4
var fs = require('fs');
var postcss = require('postcss');
var contrast = require('level4');
var css = fs.readFileSync('input.css', 'utf8');
var output = postcss()
.use(level4())
.process(css)
.css;
Transform var()
functions to compatible values.
:root {
--color: green;
}
div {
color: var(--color);
}
/* compiles to */
div {
color: green;
}
Define reusable media queries. Used with media minmax you can write some beautiful media queries.
@custom-media --name (width >= 10em) and (width <= 40em);
@media (--name) { ... }
/* compiles to */
@media screen and (min-width: 10em) and (max-width: 40em) { ... }
Define reusable custom selectors.
@custom-selector :--headings h1, h2, h3, h4, h5, h6;
:--headings + p { ... }
/* compiles to */
h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p,
h6 + p { ... }
Transform color values at will. See everything you can do with this in interface
div {
color: color(green a(90%));
}
/* compiles to */
div {
color: rgba(0, 128, 0, 0.9);
}
gray()
Transform gray()
function to rgba()
equivalent.
div {
background: gray(255, 50%);
color: gray(0);
}
/* compiles to */
div {
background: rgba(255, 255, 255, 0.5);
color: rgb(0, 0, 0);
}
Transform #RRGGBBAA
or #RGBA
to rgba()
.
div {
background: #9823f834;
color: #9d9c;
}
/* compiles to */
div {
background: rgba(152, 35, 248, 0.20392);
color: rgba(153, 221, 153, 0.8);
}
hwb()
Transform hwb()
colors to rgba()
.
div {
background: hwb(90, 0%, 0%, .5);
color: hwb(190, 50%, 0%);
}
/* compiles to */
div {
background: rgba(128, 255, 0, 0.5);
color: rgb(128, 234, 255);
}
Transforms font-variant-*
property to the more supported
font-feature-settings
.
h1 {
font-variant-caps: small-caps;
}
table {
font-variant-numeric: lining-nums;
}
/* compiles to */
h1 {
font-feature-settings: "c2sc";
font-variant-caps: small-caps;
}
table {
font-feature-settings: "lnum";
font-variant-numeric: lining-nums;
}
:matches()
Simplifies :matches()
pseudo selectors.
li:matches(:last-child, .fancy) { ... }
/* compiles to */
li:last-child, li.fancy { ... }
:not()
Transforms level 4 :not()
to a level 3 selector.
li:not(:last-child, .fancy) { ... }
/* compiles to */
li:not(:last-child):not(.fancy) { ... }
:any-link
Transforms :any-link
to :link
and :visited
.
a:any-link { ... }
/* compiles to */
a:link,a:visited { ... }
Transform >=
/<=
operators into working min-
/max-
prefixes.
@media screen and (width >= 10em) and (width <= 40em) { ... }
/* compiles to */
@media screen and (min-width: 10em) and (max-width: 40em) { ... }
You are able to write both types of nesting with this feature.
div {
color blue;
& div {
color: green;
}
@nest body & {
color: yellow;
}
}
/* compiles to */
div {
color: blue;
}
div div {
color: green;
}
body div {
color: yellow;
}
You can also combine this with custom-media.
A collection of plugins that power level4 with reference to the drafts they support..
Make a branch, npm test
often, submit a new pull when it passes.
git clone https://github.com/stephenway/level4.git
git checkout -b patch-1
npm i
npm test
FAQs
Use W3C CSS Level 4 Modules Today
The npm package level4 receives a total of 7 weekly downloads. As such, level4 popularity was classified as not popular.
We found that level4 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.