vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.78k stars 729 forks source link

vaadin-theme fonts inline generation option - using data-url - with vaadin-sass-compiler #5924

Open vaadin-bot opened 9 years ago

vaadin-bot commented 9 years ago

Originally by santeriv-profit


To make styles.css even more responsible of look-and-feel. And no extra requests for files caused by .css. :)

Example here http://jsfiddle.net/yjmkdvqn/

As those three open-sans font files 300(light),400(regular),600(semibold) were part of default valo-theme.

Above example base64 strings were generated from Vaadin 7.3.4 () using base64 cmdline tool

#!bash
base64 -w 0 OpenSans-Semibold-webfont.woff > OpenSans-Semibold-webfont.woff.txt

.woff-filetype selection was made based on this : http://caniuse.com/#feat=woff


Imported from https://dev.vaadin.com/ issue #15283

vaadin-bot commented 9 years ago

Originally by @jouni


"Data URIs in IE8

IE8 mostly supports data URIs with a few minor caveats. The main problem is that IE8 data URIs cannot exceed 32kb, however this is not a huge issue, since embedded images rarely exceed this limit.

Additionally, data URIs can only be used for a handful of HTML elements in IE8: <object>, <img>, <input type="image"> & <link>. But this only concerns markup, and when it comes to CSS, IE8 allows data URIs on any element. Finally, IE8 data URIs can only be used in CSS declarations that accept a url() parameter, however since data URIs are rarely used differently, this is basically a non-issue."

Source: http://jonraasch.com/blog/css-data-uris-in-all-browsers

So we might be able to use data uris for other browsers, but there was some issue also with IE which in that case would require to use two separate @font-face declarations.

santeriv commented 7 years ago

(note to self)

stale[bot] commented 6 years ago

A lot of tickets have been left hanging in the issue tracker through the years. Some of them are still relevant, some of them have been fixed a long time ago and some are no longer valid. To get a better look on what is important and still relevant, we are closing old tickets which have not been touched in a long time. No further work will be done on this ticket. If the ticket seems to be still actual, please verify the problem existence over latest framework version and then open a new ticket in vaadin/framework with all the suitable information.