无法弄清楚如何从导入的组件中删除填充
所以我正在使用 smui-accordion 组件,我只是不知道如何删除它填充! 我尝试过在所有地方都填充零,但无济于事......
<Accordion style="padding: 0">
<Panel style="padding: 0" bind:open={reviewAccordion} variant="unelevated">
<Header style="padding: 0">
<h3 style="padding: 0"class="mva">Reviews ({reviews_list.length})</h3>
<div style="padding: 0" class="flex1"></div>
<div class="mva" style="padding: 0; height: 20px;"><StarRating rating={rating} config={star_config}/></div>
<IconButton style="padding: 0" slot="icon" toggle pressed={reviewAccordion}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
</Header>
<Content style="padding: 0">
{#each reviews_list as review, i}
<div style="padding: 0"><Review review={review}/></div>
{/each}
</Content>
</Panel>
So I'm using the smui-accordion component and I just can't figure out how to remove it's padding!
I've tried putting everywhere zero padding but to no avail...
<Accordion style="padding: 0">
<Panel style="padding: 0" bind:open={reviewAccordion} variant="unelevated">
<Header style="padding: 0">
<h3 style="padding: 0"class="mva">Reviews ({reviews_list.length})</h3>
<div style="padding: 0" class="flex1"></div>
<div class="mva" style="padding: 0; height: 20px;"><StarRating rating={rating} config={star_config}/></div>
<IconButton style="padding: 0" slot="icon" toggle pressed={reviewAccordion}>
<Icon class="material-icons" on>expand_less</Icon>
<Icon class="material-icons">expand_more</Icon>
</IconButton>
</Header>
<Content style="padding: 0">
{#each reviews_list as review, i}
<div style="padding: 0"><Review review={review}/></div>
{/each}
</Content>
</Panel>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将类添加到所有 SMUI 组件,这样您就可以执行以下操作:
您只需记住的就是将这些类标记为全局类。
您可能会使用一些实用程序类将填充设置为 0,因此这不是什么大问题。
You can plasses classes to all SMUI components, so you can do something like:
All you have to remember is to mark those classes as global.
You would probably use some utility class for setting padding to 0, so this is not so much of a problem.
您是否尝试过使用“!important”css 语句?
Have you tried to use "!important" css statement?
无需添加所有内联内容,只需在上面添加一个 css 标签:
上面只是手风琴 css 控制台上的内容...这将覆盖第三方 css,您可以控制它。
Instead of adding all those inline just add a css tag above:
Above is just whats on console from the accordion css...This will overwrite the third party css and you can have control over it.