Skip to content

Commit

Permalink
iOS should work slightly better now
Browse files Browse the repository at this point in the history
  • Loading branch information
jouni committed Apr 9, 2014
1 parent 817ff2d commit 28b3883
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 10 deletions.
1 change: 1 addition & 0 deletions WebContent/VAADIN/themes/valo-test/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//$v-overlay-shadow-style: 0 0 0 1px shade;
//$v-window-shadow-style: none;
//$v-font-weight--header: bold;
//$v-table-background-color: #fff;

//$v-bevel-style: inset 0 4px 1px hilite, inset 0 -4px 1px shade;

Expand Down
4 changes: 1 addition & 3 deletions WebContent/VAADIN/themes/valo/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ $v-button-disabled-opacity: $v-disabled-opacity !default;


@mixin v-valo-button-common-properties {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
@include user-select(none);
@include v-valo-tappable;
cursor: $v-button-cursor;
font-weight: $v-button-font-weight;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion WebContent/VAADIN/themes/valo/components/_checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
top: .2em;
z-index: 0;
margin: 0;

&:focus ~ label:before {
@include v-valo-button-focus-style($background-color: $background-color);
box-shadow: v-valo-button-box-shadow($background-color), v-valo-focus-box-shadow();
Expand Down
3 changes: 2 additions & 1 deletion WebContent/VAADIN/themes/valo/components/_combobox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ $v-combobox-hover-style-enabled: $v-hover-styles-enabled !default;

@mixin v-valo-combobox-button-style ($unit-size: $v-unit-size, $bevel-style: $v-bevel-style, $bevel-depth: $v-bevel-depth,
$background-color: $v-textfield-background-color) {
position: absolute;
@include v-valo-tappable;
position: absolute;
top: $v-textfield-border-width;
right: $v-textfield-border-width;
width: $unit-size;
Expand Down
2 changes: 2 additions & 0 deletions WebContent/VAADIN/themes/valo/components/_csslayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
// Assume most components have borders.
// This is just a best-guess, will need fine-tuning if border-widths vary from widget-to-widget
.v-widget {
vertical-align: middle;

@if $v-border-width > 0 {
margin-left: -$v-border-width;
} @else {
Expand Down
4 changes: 3 additions & 1 deletion WebContent/VAADIN/themes/valo/components/_datefield.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ $v-datefield-hover-style-enabled: $v-hover-styles-enabled !default;

@mixin v-valo-datefield-button-style ($unit-size: $v-unit-size, $bevel-style: $v-bevel-style, $bevel-depth: $v-bevel-depth,
$background-color: $v-textfield-background-color) {
-webkit-appearance: none;
@include v-valo-tappable;
-webkit-appearance: none;
background: transparent;
border: none;
padding: 0;
position: absolute;
top: $v-textfield-border-width;
left: $v-textfield-border-width;
Expand Down
7 changes: 5 additions & 2 deletions WebContent/VAADIN/themes/valo/components/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ $v-table-background-color: null !default;


@function v-valo-table-background-color($context: $v-app-background-color) {
@return $context;
@if is-dark-color($context) {
@return darken($context, 2%);
}
@return lighten($context, 2%);
}


Expand Down Expand Up @@ -389,7 +392,7 @@ $v-table-background-color: null !default;
height: $v-table-row-height + $v-table-border-width;
left: 0;
right: 0;
background: v-valo-focus-color($context: $background-color);
background: v-valo-focus-color();
@include opacity(.2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
right: round($v-unit-size/4);
top: $v-unit-size - $v-button-border-width;
padding: 0;
text-align: center;

&:first-child {
top: 0;
Expand Down
2 changes: 2 additions & 0 deletions WebContent/VAADIN/themes/valo/shared/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ $v-valo-global-included: false !default;

.v-app {
height: 100%;
// Cancel tap highlight from all elements inside the app
-webkit-tap-highlight-color: rgba(0,0,0,0);
}

.v-ui {
Expand Down
3 changes: 3 additions & 0 deletions WebContent/VAADIN/themes/valo/shared/_overlay.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,7 @@ $v-selection-item-font-weight: max(400, $v-font-weight);
border-radius: $v-border-radius;
overflow: hidden;
@include opacity(.5);

// This has the unfortunate side-effect of selecting an the table row where the drag is dropped
//pointer-events: none;
}
9 changes: 9 additions & 0 deletions WebContent/VAADIN/themes/valo/util/_util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,13 @@

@mixin v-valo-round {
border-radius: 50%;
}




@mixin v-valo-tappable {
@include user-select(none);
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-touch-callout: none;
}
2 changes: 0 additions & 2 deletions src/com/vaadin/theme/valo/test/ValoThemeUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.vaadin.risto.mockupcontainer.MockupDataSet;
import org.vaadin.risto.mockupcontainer.MockupFactory;

import com.vaadin.annotations.JavaScript;
import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Title;
import com.vaadin.data.Property.ValueChangeEvent;
Expand Down Expand Up @@ -86,7 +85,6 @@
@SuppressWarnings("serial")
@Theme("valo-test")
@Title("Valo Theme Test")
@JavaScript("fastclick.js")
public class ValoThemeUI extends UI implements Handler {

CssLayout root = new CssLayout();
Expand Down

0 comments on commit 28b3883

Please sign in to comment.