In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "what is the role of jss's high-performance JS to CSS compiler", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the role of jss's high-performance JS to CSS compiler?"
JsS is a more powerful abstraction than css, which uses JavaScript to describe styles in a declarative and maintainable manner. It is a high-performance jstocss compiler that runs at run time and on the server side. It is low-level and framework-independent, about the size of 6KB, and can be extended through the plug-in API.
JsS usage scenario
Build heavy applications for JavaScript
Using a component-based architecture
Building reusable UI libraries
Requires a conflict-free css (external content, third-party UI components, etc.)
Need to share code between js and css
It's important to have a small download.
Robustness and code reuse are important
Easy maintenance is important
The code for jsS
Demo
Importjssfrom'jss'
Importpresetfrom'jss-preset-default'
Importcolorfrom'color'
/ / Onetimesetupwithdefaultpluginsandsettings.
Jss.setup (preset ())
Conststyles= {
Button: {
FontSize:12
'&: hover': {
Background:'blue'
}
}
CtaButton: {
Extend:'button'
'&: hover': {
Background:color ('blue')
.darken (0.3)
.hex ()
}
}
Button: {
Width:200
}
}
}
Const {classes} = jss.createStyleSheet (styles) .attach ()
Document.body.innerhtml= `
Button
CTAButton
At this point, I believe that everyone on the "jss high-performance JS to CSS compiler what the role of" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.