diff --git a/src/test/java/com/flowingcode/addons/ycalendar/MonthDemo.java b/src/test/java/com/flowingcode/addons/ycalendar/MonthDemo.java index 63ed31d..ba0e03d 100644 --- a/src/test/java/com/flowingcode/addons/ycalendar/MonthDemo.java +++ b/src/test/java/com/flowingcode/addons/ycalendar/MonthDemo.java @@ -36,7 +36,7 @@ public class MonthDemo extends Div { public MonthDemo() { - + addClassName("month-demo"); MonthCalendar calendar = new MonthCalendar(YearMonth.now()); calendar.setClassNameGenerator(date -> { diff --git a/src/test/java/com/flowingcode/addons/ycalendar/YearDemo.java b/src/test/java/com/flowingcode/addons/ycalendar/YearDemo.java index d6a506c..3a8465d 100644 --- a/src/test/java/com/flowingcode/addons/ycalendar/YearDemo.java +++ b/src/test/java/com/flowingcode/addons/ycalendar/YearDemo.java @@ -43,6 +43,7 @@ public class YearDemo extends Div { TestUtils.getMethod(IntegerField.class, "setStepButtonsVisible", boolean.class).orElse(null); public YearDemo() { + addClassName("year-demo"); YearCalendar calendar = new YearCalendar(); calendar.setClassNameGenerator(date -> { if (TestUtils.isPublicHoliday(date)) { diff --git a/src/test/java/com/flowingcode/addons/ycalendar/YearMonthCalendarDemoView.java b/src/test/java/com/flowingcode/addons/ycalendar/YearMonthCalendarDemoView.java index 8290b64..d3ae87e 100644 --- a/src/test/java/com/flowingcode/addons/ycalendar/YearMonthCalendarDemoView.java +++ b/src/test/java/com/flowingcode/addons/ycalendar/YearMonthCalendarDemoView.java @@ -22,6 +22,7 @@ import com.flowingcode.vaadin.addons.DemoLayout; import com.flowingcode.vaadin.addons.GithubLink; import com.flowingcode.vaadin.addons.demo.TabbedDemo; +import com.vaadin.flow.component.dependency.CssImport; import com.vaadin.flow.component.dependency.StyleSheet; import com.vaadin.flow.router.ParentLayout; import com.vaadin.flow.router.Route; @@ -30,7 +31,7 @@ @ParentLayout(DemoLayout.class) @Route("year-month-calendar") @GithubLink("https://github.com/FlowingCode/YearMonthCalendarAddon") -@StyleSheet("context://styles/ycalendar-styles.css") +@CssImport("./styles/ycalendar-styles.css") public class YearMonthCalendarDemoView extends TabbedDemo { public YearMonthCalendarDemoView() { diff --git a/src/test/resources/META-INF/resources/styles/ycalendar-styles.css b/src/test/resources/META-INF/frontend/styles/ycalendar-styles.css similarity index 81% rename from src/test/resources/META-INF/resources/styles/ycalendar-styles.css rename to src/test/resources/META-INF/frontend/styles/ycalendar-styles.css index 94ab823..df0d981 100644 --- a/src/test/resources/META-INF/resources/styles/ycalendar-styles.css +++ b/src/test/resources/META-INF/frontend/styles/ycalendar-styles.css @@ -17,11 +17,11 @@ * limitations under the License. * #L% */ -#content vaadin-horizontal-layout { +.year-demo vaadin-horizontal-layout, .month-demo vaadin-horizontal-layout { gap: 0px; flex-wrap: wrap } -#content vaadin-horizontal-layout > * { +.year-demo vaadin-horizontal-layout > *, .month-demo vaadin-horizontal-layout > * { padding-left: 1ex; }