Vaadin无法更改按钮颜色

时间:2019-01-01 14:18:27

标签: java css eclipse vaadin

我尝试更改style.cssmytheme.scss文件中按钮的颜色,但是当我更改.mytheme .v-button中的背景颜色时,什么都没有发生。我正在使用Valo主题。我在做错什么吗?

这是Style.css

中的代码
.mytheme .v-button {
    position: relative;
    text-align: center;
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    cursor: pointer;
    height: 37px;
    padding: 0 16px;
    color: #191919;
    font-weight: 400;


    border-radius: 4px;
    border: 1px solid #c5c5c5;
    border-top-color: #c5c5c5;
    border-bottom-color: #bcbcbc;
    background-color: #000000;
    background-image: -webkit-linear-gradient(top, #fafafa 2%, #efefef 98%);
    background-image: linear-gradient(to bottom,#fafafa 2%, #efefef 98%);
    -webkit-box-shadow: inset 0 1px 0 white, inset 0 -1px 0 #e7e7e7, 0 2px 3px rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 0 white, inset 0 -1px 0 #e7e7e7, 0 2px 3px rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

编辑:

我现在遇到的问题是我的垂直布局不会居中:

public MainMenuView() {
    vLayout.addComponent(buttons);
    vLayout.setSizeFull();
    vLayout.setComponentAlignment(buttons, Alignment.MIDDLE_CENTER);
    this.setCompositionRoot(vLayout);

    addMerchant.setStyleName("mystyle");
    showMerchants.setStyleName("mystyle");
    merchantSearch.setStyleName("mystyle");
    lHeader.addStyleName("mylabelstyle");
    addMerchant.addClickListener(e -> addMerchant());
    showMerchants.addClickListener(e -> showMerchants());
    merchantSearch.addClickListener(e -> merchantSearch());

}

0 个答案:

没有答案