Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] 第119天 你有没有自己写过一套UI库?说下遇到哪些难点? #1058

Open
haizhilin2013 opened this issue Aug 12, 2019 · 4 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第119天 你有没有自己写过一套UI库?说下遇到哪些难点?

@haizhilin2013 haizhilin2013 added the css css label Aug 12, 2019
@Gloomysunday28
Copy link

目录划分、按需加载当时有点疑惑

@LJH520
Copy link

LJH520 commented Aug 13, 2019

没有写过,都是和组件封一起┭┮﹏┭┮

@XboxYan
Copy link

XboxYan commented Aug 15, 2019

有啊。这是一个基于web-components的UI组件库

http://xy-ui.codelabo.cn/docs

感觉如何设计组件的整体主题样式和配置项是个难点

这里采用css自定义属性

:root{
    --themeColor:#42b983
}

比如有一种组件,有的人可能喜欢上面一种风格,有的人可能喜欢下面那种风格

<xy-select>
    <xy-option>AAA</xy-option>
    <xy-option>BBB</xy-option>
</xy-select>
<!--or-->
<xy-select values=['AAA','BBB']></xy-select>

@ipadthree
Copy link

维护过,碰到的坑主要是
1)同一个UI component在不同地方使用的customization问题。
2)还有如果UI component如果有bug的话会导致所有使用的地方都出现bug
3)改了一个UI component后在A处work,但是在B处因为context不一样导致render出来的效果不一样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

5 participants