From 6c624e86e39d8dc59452a2ce3e182d78b1f9eaeb Mon Sep 17 00:00:00 2001 From: Pekka Hyvönen Date: Wed, 1 Feb 2017 19:13:08 +0200 Subject: Replace FontAwesome with Vaadin Icons (#8208) * Include FontAwesome by default for easier migration * Fix JSComponentLoadingIndicatorTest Fixes #7979 Addresses part of #8219 --- themes/.gitignore | 1 + themes/pom.xml | 29 ++++++++++++++++++++++ .../themes/VAADIN/themes/valo/fonts/_fonts.scss | 24 +++++++++++++++--- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 themes/.gitignore (limited to 'themes') diff --git a/themes/.gitignore b/themes/.gitignore new file mode 100644 index 0000000000..9f11b838a5 --- /dev/null +++ b/themes/.gitignore @@ -0,0 +1 @@ +src/main/themes/VAADIN/addons/* diff --git a/themes/pom.xml b/themes/pom.xml index 76af861d0c..9181af2e21 100644 --- a/themes/pom.xml +++ b/themes/pom.xml @@ -35,6 +35,12 @@ provided + + com.vaadin + vaadin-icons + provided + + com.carrotsearch smartsprites @@ -50,6 +56,29 @@ + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 + + + copy-font-icons + process-resources + + unpack-dependencies + + + + com.vaadin + vaadin-icons + true + VAADIN\/addons\/vaadin-icons\/** + true + ${project.basedir}/src/main/themes/ + + + + maven-resources-plugin diff --git a/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss b/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss index 8a51b765b9..9c45d6deda 100644 --- a/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss +++ b/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss @@ -4,20 +4,36 @@ @import "roboto/roboto"; @import "lato/lato"; @import "lora/lora"; +@import "../../../VAADIN/addons/vaadin-icons/vaadin-icons.scss"; +/// Include VaadinIcons. They are included in Valo +/// since Vaadin Framework version 8.0 (#7979) +/// https://vaadin.com/icons + +$v-icons: true !default; + +/// Set the value of this variable to `false` if you want to exclude the Font Awesome icons. +/// Only included to ease migration, and will not be updated in the future. +/// We encourage you to use the FontAwesomeLabel add-on from the Directory instead: +/// https://vaadin.com/directory/#!addon/fontawesomelabel $v-font-awesome: true !default; -$fontawesome-pathPrefix: null; +$font-icons-pathPrefix: null; @if $v-relative-paths == true { - $fontawesome-pathPrefix: "../../../"; + $font-icons-pathPrefix: "../../../"; } @mixin valo-fonts { // Valo Icons - @include v-font(ThemeIcons, "#{$fontawesome-pathPrefix}../valo/fonts/themeicons-webfont/themeicons-webfont"); + @include v-font(ThemeIcons, "#{$font-icons-pathPrefix}../valo/fonts/themeicons-webfont/themeicons-webfont"); + // Vaadin Icons + @if $v-icons { + @include vaadin-icons; + } + // FontAwesome @if $v-font-awesome { - @include v-font(FontAwesome, "#{$fontawesome-pathPrefix}../valo/fonts/fontawesome-webfont/fontawesome-webfont"); + @include v-font(FontAwesome, "#{$font-icons-pathPrefix}../valo/fonts/fontawesome-webfont/fontawesome-webfont"); } } -- cgit v1.2.3