Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent ordering of output. #6

Closed
Danack opened this issue Jul 3, 2017 · 1 comment
Closed

Consistent ordering of output. #6

Danack opened this issue Jul 3, 2017 · 1 comment
Assignees

Comments

@Danack
Copy link

Danack commented Jul 3, 2017

Hi,

Is it possible for the fonts CSS output file to be ordered consistently? If not, please consider this to be a feature request to allow that.

We store the built fonts.css file in source control to allow for easy testing of builds.

The problem I'm currently seeing is that the output seems to be ordered randomly. This means that even if the input settings for the fonts haven't changed, it seems that the built font.css file can change arbitrarily.

For the example diff below, on one build, Roboto was placed before Open Sans, and then in the next build Open Sans was placed before Roboto. This generates a large diff, when there is no real difference between the files.

Possibly ordering the output by the "Roboto - regular" string would be one solution to that.

cheers
Dan

diff --git a/www/styles/fonts.css b/www/styles/fonts.css
index 40ecef7..4a9b45c 100644
--- a/www/styles/fonts.css
+++ b/www/styles/fonts.css
@@ -1,18 +1,3 @@
-/* === Roboto - regular */
-@font-face {
-	font-family: 'Roboto';
-	font-style: normal;
-	font-weight: 400;
-	src: url("./../font/Roboto-Regular.eot");
-	src: local("Roboto"),
-		local("Roboto-Regular"),
-		url("./../font/Roboto-Regular.eot") format("embedded-opentype"),
-		url("./../font/Roboto-Regular.woff") format("woff"),
-		url("./../font/Roboto-Regular.woff2") format("woff2"),
-		url("./../font/Roboto-Regular.ttf") format("truetype"),
-		url("./../font/Roboto-Regular.svg") format("svg");
-}
-
 /* === Open Sans - regular */
 @font-face {
 	font-family: 'Open Sans';
@@ -27,3 +12,18 @@
 		url("./../font/OpenSans-Regular.ttf") format("truetype"),
 		url("./../font/OpenSans-Regular.svg") format("svg");
 }
+
+/* === Roboto - regular */
+@font-face {
+	font-family: 'Roboto';
+	font-style: normal;
+	font-weight: 400;
+	src: url("./../font/Roboto-Regular.eot");
+	src: local("Roboto"),
+		local("Roboto-Regular"),
+		url("./../font/Roboto-Regular.eot") format("embedded-opentype"),
+		url("./../font/Roboto-Regular.woff") format("woff"),
+		url("./../font/Roboto-Regular.woff2") format("woff2"),
+		url("./../font/Roboto-Regular.ttf") format("truetype"),
+		url("./../font/Roboto-Regular.svg") format("svg");
+}

@gabiseabra gabiseabra self-assigned this Jul 3, 2017
@Danack
Copy link
Author

Danack commented Jul 4, 2017

\o/

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants