Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
529 views
in Technique[技术] by (71.8m points)

css - How to style svelte material ui components

I'm experimenting with svelte and svelte material ui and I'm trying to figure out how I can use css to style the material UI elements.

For example if I have a List component and provide a ul style in the style block, I get a warning that the ul is unused. If I try to specify css for List or .mdc-list, a class on the generated element, it still has no effect.

<style>
 List { blah }
 or
 .mdc-list { blah }
 or
  .mylist { blah }
</style>

<List class="mylist">
...
</List>

All of these result in an unused warning and have no effect. I have worked around this by styling a containing element, but I'm not sure that will always let me do what I want. Maybe this is by design, though?

question from:https://stackoverflow.com/questions/65920281/how-to-style-svelte-material-ui-components

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...