vaadin css,Vaadin CSS doesn't take effect

作者使用CSS自定义Vaadin布局,在尝试为组件应用新样式规则时遇到问题。现有规则无法生效,即使修改现有样式类也无法看到效果。尽管能够将类应用于新组件,但更改不会反映出来。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I use CSS to customize some parts of the layouts in Vaadin. It worked fine until now. I tried to apply a new rule to one of my compoenents but it simply doesn't take effect, it stays how it is. I already have a similar rule which I tried to apply and change it, but the applying itself works, but any change I make to the CSS class doesn't take effect too.

I don't know why, but it seems like that at some point the CSS changes started not to do what they should, they just don't get active. I then tried to change existing rules which work fine, but these changes just don't appear on the webiste.

Is there any known bug or am I just doing something wrong what I have been doing right all the time? I can't help myself anymore, I am stuck with this for a time now.

Here are the CSS classes, as simple as it can be I guess:

.v-slot-slotenabrechnung {

padding-bottom: 21px;

padding-left: 21px;

}

.v-slot-myslot {

padding-bottom: 21px;

padding-left: 21px;

}

myslot is used at the moment and works fine. When I change the padding to 150px for example and rebuild the application and deploy it, nothing happens. And that's why my new class isn't working either. But attaching the myslot-class to a new component works, just not any changes to it.

I can for example change the padding to 100px and then attach it to a new component, but that's results in the 21px it had before...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值