![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.
@lwc/style-compiler
Advanced tools
Transform style sheet to be consumed by the LWC engine.
:host
pseudo-class selectorsvar()
CSS function:dir
pseudo class selector to [dir]
attribute selectorsyarn add --dev @lwc/style-compiler
const { transform } = require('@lwc/style-compiler');
const source = `
:host {
opacity: 0.4;
}
span {
text-transform: uppercase;
}
`;
const { code } = transform(source, 'example.css');
transform(source, id, options)
Options:
source
(string, required) - the css source file to compilerid
(string, required) - the css source file path, used by the compiler to produce errors with the file nameoptions
(object, optional)
customProperties
(object, optional)
resolverModule
(boolean, optional) - module name for the custom properties resolvescoped
(boolean, optional) - true if the styles are scoped (via Light DOM style scoping)disableSyntheticShadowSupport
(boolean, optional) - true if synthetic shadow DOM support is not needed, which can result in smaller outputapiVersion
(number, optional) - API version to associate with the compiled stylesheet.Return:
code
- the generated codeNote: The LWC style compiler doesn't preserve the authored format, and always produce compressed code.
::slotted
pseudo-element.>>>
deep combinator (spec still under consideration: issue).:host-context
pseudo-selector (browser vendors are not able to agree: webkit, gecko):host
selector to able to use the generated style in both the synthetic and native shadow DOM. The duplication is necessary to support the functional form of :host()
, :host(.foo, .bar) {}
needs to get transformed into .foo[x-btn-host], .bar[x-btn-host] {}
to work in the synthetic shadow DOM.:host()
need to be spread into multiple selectors. This transformation greatly increases the overall size and complexity of the generated CSS, leading to more bits on the wire, longer parsing time and longer style recalculation.FAQs
Transform style sheet to be consumed by the LWC engine
The npm package @lwc/style-compiler receives a total of 97,371 weekly downloads. As such, @lwc/style-compiler popularity was classified as popular.
We found that @lwc/style-compiler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 15 open source maintainers 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.