java - Vaadin 找不到我的主题文件

标签 java css sass vaadin vaadin8

当我遇到这个错误时,我只是想做一些正常的事情

INFO: Requested resource [/VAADIN/themes/mytheme/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

这是我的 styles.css

我的addons.scss

/* This file is automatically managed and will be overwritten from time to time. */
/* Do not manually edit this file. */

/* Import and include this mixin into your project theme to include the addon themes */
@mixin addons {
}

我的styles.scss

@import "mytheme.scss";
@import "addons.scss";

// This file prefixes all rules with the theme name to avoid causing conflicts with other themes.
// The actual styles should be defined in mytheme.scss

.mytheme {
  @include addons;
  @include mytheme;

}

我的mytheme.scss

// If you edit this file you need to compile the theme. See README.md for details.

// Global variable overrides. Must be declared before importing Valo.

// Defines the plaintext font size, weight and family. Font size affects general component sizing.
//$v-font-size: 16px;
//$v-font-weight: 300;
//$v-font-family: "Open Sans", sans-serif;

// Defines the border used by all components.
//$v-border: 1px solid (v-shade 0.7);
//$v-border-radius: 4px;

// Affects the color of some component elements, e.g Button, Panel title, etc
//$v-background-color: hsl(210, 0%, 98%);
// Affects the color of content areas, e.g  Panel and Window content, TextField input etc
//$v-app-background-color: $v-background-color;

// Affects the visual appearance of all components
//$v-gradient: v-linear 8%;
//$v-bevel-depth: 30%;
//$v-shadow-opacity: 5%;

// Defines colors for indicating status (focus, success, failure)
//$v-focus-color: valo-focus-color(); // Calculates a suitable color automatically
//$v-friendly-color: #2c9720;
//$v-error-indicator-color: #ed473b;

// For more information, see: https://vaadin.com/book/-/page/themes.valo.html
// Example variants can be copy/pasted from https://vaadin.com/wiki/-/wiki/Main/Valo+Examples

@import "../valo/valo.scss";

@mixin mytheme {
  @include valo;

  // Insert your own theme rules here
}

哦,我正在使用 Eclipse,所以 Vaadin can't find my themes不会帮助 谢谢

最佳答案

我已经通过运行找到了自己的答案

mvn package jetty:run

代替

mvn jetty:run

重置 vaadins 样式

关于java - Vaadin 找不到我的主题文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46250322/

相关文章:

html - 调整窗口大小会在 body 标签旁边创建边距

css - 任何 scss 文件更改时出现 node-sass 错误

html - 我如何在 calc 中舍入值?

java - 如何让 JPanel 以正确的循环顺序改变颜色?

java - Groovy - 简单的日期重新格式化

java - Spring Data JPA native 查询中的变量

jQuery .click 和媒体查询

java - 我们可以再次使用相同的 websocket 连接吗?

html - 我正在尝试制作计时器,我想将这 3 个按钮放在圆圈中

javascript - 如何使用 Meteor 路由页面加载不同的 Scss 文件