From eb4e2314fbd016b4ef4bd1640c5fc48876f9a46d Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Fri, 14 Nov 2014 12:21:26 +0200 Subject: Drop indicators in Valo are now working as in Reindeer theme (#14836) Change-Id: I12014c4329ca629dbfc9226b3b70538d33442690 --- .../VAADIN/themes/valo/components/_table.scss | 61 +++++++++------------- 1 file changed, 25 insertions(+), 36 deletions(-) (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/valo/components/_table.scss b/WebContent/VAADIN/themes/valo/components/_table.scss index a70532ccfd..019d8673ce 100644 --- a/WebContent/VAADIN/themes/valo/components/_table.scss +++ b/WebContent/VAADIN/themes/valo/components/_table.scss @@ -238,6 +238,7 @@ $v-table-background-color: null !default; border-left: $v-table-border-width solid $border-color; overflow: hidden; height: $v-table-row-height; + vertical-align: middle; &:first-child { border-left: none; @@ -520,46 +521,28 @@ $v-table-background-color: null !default; } } - .#{$primary-stylename}-row-drag-middle td:first-child:before { - content: ""; - display: block; - position: absolute; - z-index: 1; - height: $v-table-row-height + $v-table-border-width; - left: 0; - right: 0; - background: $v-focus-color; - @include opacity(.2); + .#{$primary-stylename}-row-drag-middle .#{$primary-stylename}-cell-content { + $bg: mix($v-focus-color, $background-color, 20%); + background-color: $bg; + color: valo-font-color($bg); } - .#{$primary-stylename}-row-drag-top td:first-child:before, - .#{$primary-stylename}-row-drag-bottom td:first-child:after { - content: "\2022"; - display: block; - position: absolute; - height: 2px; - left: 0; - right: 0; - background: $v-focus-color; - font-size: $v-font-size * 2; - line-height: 2px; - color: $v-focus-color; - text-indent: round($v-font-size/-4); - text-shadow: 0 0 1px $background-color, 0 0 1px $background-color; + .#{$primary-stylename}-row-drag-bottom td.#{$primary-stylename}-cell-content { + border-bottom: 2px solid $v-focus-color; + height: $v-table-row-height - 2px; } - .#{$primary-stylename}-row-drag-top td:first-child:before { - margin-top: -$v-table-border-width; + .#{$primary-stylename}-row-drag-bottom .#{$primary-stylename}-cell-wrapper { + margin-bottom: -2px; } - .v-ff & .#{$primary-stylename}-row-drag-top td:first-child:before, - .v-ff & .#{$primary-stylename}-row-drag-bottom td:first-child:after { - line-height: 1px; + .#{$primary-stylename}-row-drag-top td.#{$primary-stylename}-cell-content { + border-top: 2px solid $v-focus-color; + height: $v-table-row-height - 2px + $v-table-border-width; } - .v-ie & .#{$primary-stylename}-row-drag-top td:first-child:before, - .v-ie & .#{$primary-stylename}-row-drag-bottom td:first-child:after { - line-height: 0; + .#{$primary-stylename}-row-drag-top .#{$primary-stylename}-cell-wrapper { + margin-top: -1px; } @@ -700,6 +683,11 @@ $v-table-background-color: null !default; border-top: none; border-bottom: none; } + + .#{$primary-stylename}-row-drag-top .#{$primary-stylename}-cell-content, + .#{$primary-stylename}-row-drag-bottom .#{$primary-stylename}-cell-content { + height: $v-table-row-height - 1px; + } } @@ -814,10 +802,6 @@ $v-table-background-color: null !default; margin-top: round($row-height/-2); } - .#{$primary-stylename}-row-drag-middle td:first-child:before { - height: $row-height + $v-table-border-width; - } - &.v-treetable { .#{$primary-stylename}-cell-wrapper { padding-left: 0; @@ -839,4 +823,9 @@ $v-table-background-color: null !default; padding-right: $cell-padding-horizontal; } } + + .#{$primary-stylename}-row-drag-top .#{$primary-stylename}-cell-content, + .#{$primary-stylename}-row-drag-bottom .#{$primary-stylename}-cell-content { + height: $row-height - 1px; + } } -- cgit v1.2.3 From 1d12fc07677debcac711586b5a57c2f397f3ec1f Mon Sep 17 00:00:00 2001 From: Denis Anisimov Date: Sat, 8 Nov 2014 12:47:05 +0200 Subject: Set v-bevel to 'false' should unset 'v-textfield-bevel' value (#14634). Change-Id: Ia3598b9bcef280bef38daa189ab3c7885e5d535a --- .../tests-valo-textfield-bevel/_variables.scss | 3 ++ .../themes/tests-valo-textfield-bevel/styles.scss | 6 +++ .../VAADIN/themes/valo/components/_textfield.scss | 2 +- .../vaadin/tests/themes/valo/TextFieldBevel.java | 52 +++++++++++++++++++ .../tests/themes/valo/TextFieldBevelTest.java | 59 ++++++++++++++++++++++ 5 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 WebContent/VAADIN/themes/tests-valo-textfield-bevel/_variables.scss create mode 100644 WebContent/VAADIN/themes/tests-valo-textfield-bevel/styles.scss create mode 100644 uitest/src/com/vaadin/tests/themes/valo/TextFieldBevel.java create mode 100644 uitest/src/com/vaadin/tests/themes/valo/TextFieldBevelTest.java (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/tests-valo-textfield-bevel/_variables.scss b/WebContent/VAADIN/themes/tests-valo-textfield-bevel/_variables.scss new file mode 100644 index 0000000000..b1b215a40c --- /dev/null +++ b/WebContent/VAADIN/themes/tests-valo-textfield-bevel/_variables.scss @@ -0,0 +1,3 @@ +$v-bevel: false; + +@import "../valo/valo"; diff --git a/WebContent/VAADIN/themes/tests-valo-textfield-bevel/styles.scss b/WebContent/VAADIN/themes/tests-valo-textfield-bevel/styles.scss new file mode 100644 index 0000000000..96a3ca63b6 --- /dev/null +++ b/WebContent/VAADIN/themes/tests-valo-textfield-bevel/styles.scss @@ -0,0 +1,6 @@ +@import "variables"; +@import "../tests-valo/valotest"; + +.tests-valo-textfield-bevel { + @include valotest; +} diff --git a/WebContent/VAADIN/themes/valo/components/_textfield.scss b/WebContent/VAADIN/themes/valo/components/_textfield.scss index 58f69e5e4c..50cb7b8042 100644 --- a/WebContent/VAADIN/themes/valo/components/_textfield.scss +++ b/WebContent/VAADIN/themes/valo/components/_textfield.scss @@ -14,7 +14,7 @@ $v-textfield-background-color--readonly: darkest-color($v-app-background-color, * The bevel style for text fields. See the documentation for $v-bevel. * @group textfield */ -$v-textfield-bevel: inset 0 1px 0 v-shade !default; +$v-textfield-bevel: if($v-bevel and ($v-bevel != none), inset 0 1px 0 v-shade, $v-bevel) !default; /** * The shadow style for text fields. See the documentation for $v-shadow. diff --git a/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevel.java b/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevel.java new file mode 100644 index 0000000000..4e1debc5b6 --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevel.java @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.themes.valo; + +import com.vaadin.annotations.Theme; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.TextField; + +/** + * Test UI for $v-textfield-bevel value in TextField component. + * + * @author Vaadin Ltd + */ +@Theme("tests-valo-textfield-bevel") +public class TextFieldBevel extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + TextField field = new TextField(); + addComponent(field); + } + + @Override + protected Integer getTicketNumber() { + return 14634; + } + + @Override + protected String getTestDescription() { + return "Set v-bevel to 'false' should unset 'v-textfield-bevel' value."; + } + + @Theme("valo") + public static class ValoDefaultTextFieldBevel extends TextFieldBevel { + + } + +} diff --git a/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevelTest.java b/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevelTest.java new file mode 100644 index 0000000000..ee2cdd41f8 --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/TextFieldBevelTest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.themes.valo; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.elements.TextFieldElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +/** + * Test for $v-textfield-bevel value when $v-bevel is unset. + * + * @author Vaadin Ltd + */ +public class TextFieldBevelTest extends MultiBrowserTest { + + @Test + public void testTextFieldBevel() { + String url = getTestUrl(); + StringBuilder defaultValoUi = new StringBuilder( + TextFieldBevel.class.getSimpleName()); + defaultValoUi.append('$'); + defaultValoUi.append(TextFieldBevel.ValoDefaultTextFieldBevel.class + .getSimpleName()); + url = url.replace(TextFieldBevel.class.getSimpleName(), + defaultValoUi.toString()); + getDriver().get(url); + + String defaultBoxShadow = $(TextFieldElement.class).first() + .getCssValue("box-shadow"); + + if (url.contains("restartApplication")) { + openTestURL(); + } else { + openTestURL("restartApplication"); + } + + String boxShadow = $(TextFieldElement.class).first().getCssValue( + "box-shadow"); + + Assert.assertNotEquals( + "Set v-bevel to 'false' doesn't affect 'v-textfield-bevel' value", + defaultBoxShadow, boxShadow); + } +} -- cgit v1.2.3 From a020fd45a9b8c77dd6232f6aa9aa13e7a5434427 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Mon, 17 Nov 2014 16:52:02 +0200 Subject: Valo menu broken on Android Chrome (#15236) Change-Id: Idadbbdfe0a9abaf1dd7ada339b618890b2be6e06 --- WebContent/VAADIN/themes/valo/components/_valo-menu.scss | 2 ++ 1 file changed, 2 insertions(+) (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss index 071aceb971..3b71577126 100644 --- a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss +++ b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss @@ -193,6 +193,7 @@ $valo-menu-background-color: scale-color($v-app-background-color, $lightness: if height: $v-unit-size !important; padding-top: 0; padding-bottom: 0; + -webkit-backface-visibility: hidden; } .valo-menu .v-menubar-user-menu { @@ -205,6 +206,7 @@ $valo-menu-background-color: scale-color($v-app-background-color, $lightness: if height: $v-unit-size; color: valo-font-color($v-selection-color, 0.5); max-width: 30%; + -webkit-backface-visibility: hidden; .v-menubar-menuitem { line-height: $v-unit-size - 1px; -- cgit v1.2.3 From ac81f649549c51318bf442589cc01622f5a8b255 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Mon, 17 Nov 2014 17:12:55 +0200 Subject: Unwanted horizontal scrollbar in Valo menu (#15237) Change-Id: Ic435e3ca741669db6f707961ac66a4c2e30bf765 --- WebContent/VAADIN/themes/valo/components/_valo-menu.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss index 3b71577126..5ed125b909 100644 --- a/WebContent/VAADIN/themes/valo/components/_valo-menu.scss +++ b/WebContent/VAADIN/themes/valo/components/_valo-menu.scss @@ -330,6 +330,7 @@ $valo-menu-background-color: scale-color($v-app-background-color, $lightness: if padding: 0 round($v-unit-size) 0 round($v-unit-size/2); cursor: pointer; position: relative; + overflow: hidden; text-shadow: valo-text-shadow($font-color: $font-color, $background-color: $bg, $offset: 2px); @include transition(background-color 300ms, color 60ms); -- cgit v1.2.3 From a0f4c3dfb37b1e742b74a78d8133b1bb4a399052 Mon Sep 17 00:00:00 2001 From: Fabian Lange Date: Thu, 30 Oct 2014 11:58:26 +0100 Subject: Window modalitycurtain will now respect $v-animations-enabled (#15135) Change-Id: I80beea694c2a103aaf1fb479e1de48c515428fbb --- .../tests-valo-disabled-animations/_variables.scss | 3 ++ .../tests-valo-disabled-animations/styles.scss | 6 ++++ .../VAADIN/themes/valo/components/_window.scss | 11 +++---- .../vaadin/tests/themes/valo/ModalWindowTest.java | 34 ++++++++++++++++++++++ 4 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 WebContent/VAADIN/themes/tests-valo-disabled-animations/_variables.scss create mode 100644 WebContent/VAADIN/themes/tests-valo-disabled-animations/styles.scss create mode 100644 uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/tests-valo-disabled-animations/_variables.scss b/WebContent/VAADIN/themes/tests-valo-disabled-animations/_variables.scss new file mode 100644 index 0000000000..d2411c675c --- /dev/null +++ b/WebContent/VAADIN/themes/tests-valo-disabled-animations/_variables.scss @@ -0,0 +1,3 @@ +$v-animations-enabled: false; + +@import "../valo/valo"; diff --git a/WebContent/VAADIN/themes/tests-valo-disabled-animations/styles.scss b/WebContent/VAADIN/themes/tests-valo-disabled-animations/styles.scss new file mode 100644 index 0000000000..b941c1b3d1 --- /dev/null +++ b/WebContent/VAADIN/themes/tests-valo-disabled-animations/styles.scss @@ -0,0 +1,6 @@ +@import "variables"; +@import "../tests-valo/valotest"; + +.tests-valo-disabled-animations { + @include valotest; +} diff --git a/WebContent/VAADIN/themes/valo/components/_window.scss b/WebContent/VAADIN/themes/valo/components/_window.scss index ce7a530c98..23fa5338c2 100644 --- a/WebContent/VAADIN/themes/valo/components/_window.scss +++ b/WebContent/VAADIN/themes/valo/components/_window.scss @@ -89,11 +89,12 @@ $v-window-modality-curtain-background-color: #222 !default; left: 0; @include radial-gradient(circle at 50% 50%, $v-window-modality-curtain-background-color, darken($v-window-modality-curtain-background-color, valo-gradient-opacity()), $fallback: $v-window-modality-curtain-background-color); @include opacity(max(0.2, 0.8 - valo-gradient-opacity()/100%)); - @include valo-animate-in-fade($duration: 400ms, $delay: 100ms); - - .v-op12 & { - // Opera 12 has a shitbreak with the fade-in (flickers) - @include animation(none); + @if $v-animations-enabled { + @include valo-animate-in-fade($duration: 400ms, $delay: 100ms); + .v-op12 & { + // Opera 12 has a shitbreak with the fade-in (flickers) + @include animation(none); + } } } diff --git a/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java b/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java new file mode 100644 index 0000000000..b97ce43ed6 --- /dev/null +++ b/uitest/src/com/vaadin/tests/themes/valo/ModalWindowTest.java @@ -0,0 +1,34 @@ +package com.vaadin.tests.themes.valo; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.ModalWindow; +import com.vaadin.tests.tb3.SingleBrowserTest; +import org.junit.Test; +import org.openqa.selenium.WebElement; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; + +public class ModalWindowTest extends SingleBrowserTest { + + @Override + protected Class getUIClass() { + return ModalWindow.class; + } + + @Test + public void modalAnimationsAreDisabled() { + openTestURL("theme=tests-valo-disabled-animations"); + + openModalWindow(); + + WebElement modalityCurtain = findElement(By.className("v-window-modalitycurtain")); + + assertThat(modalityCurtain.getCssValue("-webkit-animation-name"), is("none")); + } + + private void openModalWindow() { + $(ButtonElement.class).get(1).click(); + } +} \ No newline at end of file -- cgit v1.2.3