You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2016/01/27 00:29:48 UTC
[GitHub] couchdb-fauxton pull request: Fontawesome updates
GitHub user benkeen opened a pull request:
https://github.com/apache/couchdb-fauxton/pull/630
Fontawesome updates
See individual commit messages.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/benkeen/couchdb-fauxton fontawesome-updates
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-fauxton/pull/630.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #630
----
commit e8ef68e41a19c22aa76d2cdc1cc6f372b106cfa9
Author: Ben Keen <be...@gmail.com>
Date: 2016-01-26T23:19:31Z
fontawesome publishing changes
This PR handles a bit of regression that always occurs when
we regenerate the font icon files.
This'll take a bit of explanation...
On Fauxton, we use a custom Ruby template to generate our
icons.less file, see:
https://github.com/apache/couchdb-fauxton/blob/master/assets/fonts/templates/icons.less
The problem with this is that the generated CSS is of the form:
.icon1-classname:before { content: "\f123"; }
.icon2-classname:before { content: "\f234"; }
...
That's perfectly fine CSS, but because the class isn't defined
without the :before pseudo class after it, we can't reference
and use that class in other classes in our LESS files. This
is problematic because any time we either have to re-use the
class then override everything we don't want (which I've found
wasn't always possible) or we hardcode the unicode char, like:
.mynewclass { content: "\u123"; }
And THAT is a problem because any time we update the list of
fonts and regenerate the font files, the unicode char assigned
to that class may change. As such, we have to re-examine the
whole codebase to update any icons that may have changed.
Sooo..... this adds a new glyph_less var that generates the output
in a Less-friendly format:
.icon1-classname { &:before { ... }}
Ultimately we should replace the whole lib or update it all,
but I have an immediate need to add new icons and don't want to
manually fix things yet again.
commit 73cea6dfcb38e288e651bda1c63ba354897a5bfa
Author: Ben Keen <be...@gmail.com>
Date: 2016-01-26T23:28:26Z
Add two new font icons
This adds a couple of new font icons. For cache-busting the
font files are now given a numeric suffix..
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Fontawesome updates
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/630#discussion_r51076474
--- Diff: assets/less/icons.less ---
@@ -18,21 +18,23 @@
/* had to add a custom template to the generator to get this to compile to append the proper path and specify "url" instead of "font-url":
https://github.com/seanbarclay/fontcustom/blob/1c3ad3d2633d3a8add39e8827115394e9ec02d88/lib/fontcustom/generator/template.rb
*/
+@fauxtonFont: "fauxtonicon1";
+
@font-face {
- font-family: "fauxtonicon";
- src: url("../fonts/fauxtonicon.eot");
- src: url("../fonts/fauxtonicon.eot?#iefix") format("embedded-opentype"),
- url("../fonts/fauxtonicon.woff") format("woff"),
- url("../fonts/fauxtonicon.ttf") format("truetype"),
- url("../fonts/fauxtonicon.svg#fauxtonicon") format("svg");
+ font-family: "fauxtonicon1";
+ src: url("../fonts/fauxtonicon1.eot");
+ src: url("../fonts/fauxtonicon1.eot?#iefix") format("embedded-opentype"),
+ url("../fonts/fauxtonicon1.woff") format("woff"),
+ url("../fonts/fauxtonicon1.ttf") format("truetype"),
+ url("../fonts/fauxtonicon1.svg#fauxtonicon1") format("svg");
--- End diff --
Actually it is! It's stored in the yaml file in the same folder. `font_name` or something: this is the generated less content.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Fontawesome updates
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/630#issuecomment-176168568
ah cool
+1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Fontawesome updates
Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/630#discussion_r50954660
--- Diff: assets/less/icons.less ---
@@ -18,21 +18,23 @@
/* had to add a custom template to the generator to get this to compile to append the proper path and specify "url" instead of "font-url":
https://github.com/seanbarclay/fontcustom/blob/1c3ad3d2633d3a8add39e8827115394e9ec02d88/lib/fontcustom/generator/template.rb
*/
+@fauxtonFont: "fauxtonicon1";
+
@font-face {
- font-family: "fauxtonicon";
- src: url("../fonts/fauxtonicon.eot");
- src: url("../fonts/fauxtonicon.eot?#iefix") format("embedded-opentype"),
- url("../fonts/fauxtonicon.woff") format("woff"),
- url("../fonts/fauxtonicon.ttf") format("truetype"),
- url("../fonts/fauxtonicon.svg#fauxtonicon") format("svg");
+ font-family: "fauxtonicon1";
+ src: url("../fonts/fauxtonicon1.eot");
+ src: url("../fonts/fauxtonicon1.eot?#iefix") format("embedded-opentype"),
+ url("../fonts/fauxtonicon1.woff") format("woff"),
+ url("../fonts/fauxtonicon1.ttf") format("truetype"),
+ url("../fonts/fauxtonicon1.svg#fauxtonicon1") format("svg");
--- End diff --
what do you think of putting the font-name into a variable, so it just has to get changed once?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Fontawesome updates
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/couchdb-fauxton/pull/630
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] couchdb-fauxton pull request: Fontawesome updates
Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:
https://github.com/apache/couchdb-fauxton/pull/630#issuecomment-176869598
Merged as 62f149a
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---