Code Monkey home page Code Monkey logo

Comments (4)

XboxYan avatar XboxYan commented on May 27, 2024 2

@wanliofficial

目前正在用这种方式进行重构

import style from "./index.css" assert { type: "css" };

shadowRoot.adoptedStyleSheets = [style];

from xy-ui.

XboxYan avatar XboxYan commented on May 27, 2024

组件里面的CSS部分,全是原生CSS,还是使用反引号的字符串,那这样是不是失去了编辑器的提示以及静态语法检查?目前写样式还有更好的处理方式么?能不能支持上sass?

@wanliofficial 原生 web-components 就是这样写的,没必要用 sass,最大的好处是不需要编译,关于字符串的写法倒是可以换种形式,比如通过外链的方式引入

from xy-ui.

XboxYan avatar XboxYan commented on May 27, 2024

@wanliofficial 另外,试试纯手写CSS,不用编辑器提示,相信对你的CSS能有很大提升

from xy-ui.

wanliofficial avatar wanliofficial commented on May 27, 2024

ok

from xy-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.