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

Redundant character "\f053" is displayed on ::before block menu item/node, In RTL mode #52

Open
nadavkav opened this issue Mar 23, 2014 · 11 comments

Comments

@nadavkav
Copy link

.dir-rtl .collapsed .tree_item.branch:before {
content: " \f053";
}

The above CSS code, display a wierd (http://www.utf8icons.com/character/61523/UTF-8-character) character, in RTL mode.

It seems redundant. What do you think?

@gjb2048
Copy link
Contributor

gjb2048 commented Mar 23, 2014

Its a Font Awesome code.

http://about.me/gjbarnard

On 23 March 2014 15:23, Nadav Kavalerchik [email protected] wrote:

.dir-rtl .collapsed .tree_item.branch:before {
content: " \f053";
}

The above CSS code, display a wierd (
http://www.utf8icons.com/character/61523/UTF-8-character) character, in
RTL mode.

It seems redundant. What do you think?

Reply to this email directly or view it on GitHubhttps://github.com//issues/52
.

@nadavkav
Copy link
Author

I know. but what does it suppose to mean?
Should I use some other glyph for the RTL mode?
Can I hide it?

On 23 March 2014 17:26, Gareth J Barnard [email protected] wrote:

Its a Font Awesome code.

http://about.me/gjbarnard

On 23 March 2014 15:23, Nadav Kavalerchik [email protected]
wrote:

.dir-rtl .collapsed .tree_item.branch:before {
content: " \f053";
}

The above CSS code, display a wierd (
http://www.utf8icons.com/character/61523/UTF-8-character) character, in
RTL mode.

It seems redundant. What do you think?

Reply to this email directly or view it on GitHub<
https://github.com/moodleman/moodle-theme_elegance/issues/52>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38385688
.

@gjb2048
Copy link
Contributor

gjb2048 commented Mar 23, 2014

Its fa-chevron-left - http://fontawesome.io/icon/chevron-left/ - so would
be accurate for RTL.

http://about.me/gjbarnard

On 23 March 2014 17:21, Nadav Kavalerchik [email protected] wrote:

I know. but what does it suppose to mean?
Should I use some other glyph for the RTL mode?
Can I hide it?

On 23 March 2014 17:26, Gareth J Barnard [email protected] wrote:

Its a Font Awesome code.

http://about.me/gjbarnard

On 23 March 2014 15:23, Nadav Kavalerchik [email protected]
wrote:

.dir-rtl .collapsed .tree_item.branch:before {
content: " \f053";
}

The above CSS code, display a wierd (
http://www.utf8icons.com/character/61523/UTF-8-character) character,
in
RTL mode.

It seems redundant. What do you think?

Reply to this email directly or view it on GitHub<
https://github.com/moodleman/moodle-theme_elegance/issues/52>
.

Reply to this email directly or view it on GitHub<
#52 (comment)

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38389034
.

@nadavkav
Copy link
Author

Now I understand (see).
But, I think it is redundant in some cases:
image

I already posted a fix for the fa-chevron-left #53

It seems, in this issue, that we should remove the extra fa-chevron-left icon/char, since YUI already has a "arrow-left" icon.

What do you think?

@gjb2048
Copy link
Contributor

gjb2048 commented Mar 23, 2014

That's a Moodle core issue where YUI JS injects the pix_icon instead of
using it's own core_renderer class method to determine what image to use.
So all over the place in the JS are specific references to images etc.
rather than using a CSS class which could be overridden in the theme or
being passed the correct value by the core PHP on initialisation, thus in
this case being actually OO would mean the theme overridden method would
work. I know all of this but have nightmares about submitting and getting
through a tracker issue to actually make it happen, so have not bothered.
And somewhere there is an existing issue to use icon fonts instead, but as
normal has been ignored, rant over.

http://about.me/gjbarnard

On 23 March 2014 18:05, Nadav Kavalerchik [email protected] wrote:

Now I understand (see).
But, I think it is redundant in some cases:
[image: image]https://f.cloud.github.com/assets/231168/2494065/242970cc-b2b5-11e3-9f0d-5bb8d54c030a.png

I already posted a fix for the fa-chevron-left #53#53

It seems, in this issue, that we should remove the extra fa-chevron-left
icon/char, since YUI already has a "arrow-left" icon.

What do you think?

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38390693
.

@nadavkav
Copy link
Author

I totally agree with the rant :-)

On 23 March 2014 20:12, Gareth J Barnard [email protected] wrote:

That's a Moodle core issue where YUI JS injects the pix_icon instead of
using it's own core_renderer class method to determine what image to use.
So all over the place in the JS are specific references to images etc.
rather than using a CSS class which could be overridden in the theme or
being passed the correct value by the core PHP on initialisation, thus in
this case being actually OO would mean the theme overridden method would
work. I know all of this but have nightmares about submitting and getting
through a tracker issue to actually make it happen, so have not bothered.
And somewhere there is an existing issue to use icon fonts instead, but as
normal has been ignored, rant over.

http://about.me/gjbarnard

On 23 March 2014 18:05, Nadav Kavalerchik [email protected]
wrote:

Now I understand (see).
But, I think it is redundant in some cases:
[image: image]<
https://f.cloud.github.com/assets/231168/2494065/242970cc-b2b5-11e3-9f0d-5bb8d54c030a.png

I already posted a fix for the fa-chevron-left #53<
https://github.com/moodleman/moodle-theme_elegance/issues/53>

It seems, in this issue, that we should remove the extra fa-chevron-left
icon/char, since YUI already has a "arrow-left" icon.

What do you think?

Reply to this email directly or view it on GitHub<
#52 (comment)

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38391009
.

@gjb2048
Copy link
Contributor

gjb2048 commented Mar 23, 2014

Ok, there is a workaround. Font Awesome supplies an SVG version of the
font. This file can be copied, edited and the given character extracted
with Inkscape to get the png version. See attached. Then you can replace
the given icon in the 'pix_core' folder of the theme by finding the icon
and using the same name. This in theory would work for all of the icons
that YUI JS injects.

http://about.me/gjbarnard

On 23 March 2014 18:38, Nadav Kavalerchik [email protected] wrote:

I totally agree with the rant :-)

On 23 March 2014 20:12, Gareth J Barnard [email protected] wrote:

That's a Moodle core issue where YUI JS injects the pix_icon instead of
using it's own core_renderer class method to determine what image to use.
So all over the place in the JS are specific references to images etc.
rather than using a CSS class which could be overridden in the theme or
being passed the correct value by the core PHP on initialisation, thus in
this case being actually OO would mean the theme overridden method would
work. I know all of this but have nightmares about submitting and getting
through a tracker issue to actually make it happen, so have not bothered.
And somewhere there is an existing issue to use icon fonts instead, but
as
normal has been ignored, rant over.

http://about.me/gjbarnard

On 23 March 2014 18:05, Nadav Kavalerchik [email protected]
wrote:

Now I understand (see).
But, I think it is redundant in some cases:
[image: image]<

https://f.cloud.github.com/assets/231168/2494065/242970cc-b2b5-11e3-9f0d-5bb8d54c030a.png

I already posted a fix for the fa-chevron-left #53<
https://github.com/moodleman/moodle-theme_elegance/issues/53>

It seems, in this issue, that we should remove the extra
fa-chevron-left
icon/char, since YUI already has a "arrow-left" icon.

What do you think?

Reply to this email directly or view it on GitHub<

#52 (comment)

.

Reply to this email directly or view it on GitHub<
#52 (comment)

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38392074
.

@nadavkav
Copy link
Author

Cool idea :-)

On 23 March 2014 22:56, Gareth J Barnard [email protected] wrote:

Ok, there is a workaround. Font Awesome supplies an SVG version of the
font. This file can be copied, edited and the given character extracted
with Inkscape to get the png version. See attached. Then you can replace
the given icon in the 'pix_core' folder of the theme by finding the icon
and using the same name. This in theory would work for all of the icons
that YUI JS injects.

http://about.me/gjbarnard

On 23 March 2014 18:38, Nadav Kavalerchik [email protected]
wrote:

I totally agree with the rant :-)

On 23 March 2014 20:12, Gareth J Barnard [email protected]
wrote:

That's a Moodle core issue where YUI JS injects the pix_icon instead of
using it's own core_renderer class method to determine what image to
use.
So all over the place in the JS are specific references to images etc.
rather than using a CSS class which could be overridden in the theme or
being passed the correct value by the core PHP on initialisation, thus
in
this case being actually OO would mean the theme overridden method
would
work. I know all of this but have nightmares about submitting and
getting
through a tracker issue to actually make it happen, so have not
bothered.
And somewhere there is an existing issue to use icon fonts instead, but
as
normal has been ignored, rant over.

http://about.me/gjbarnard

On 23 March 2014 18:05, Nadav Kavalerchik [email protected]
wrote:

Now I understand (see).
But, I think it is redundant in some cases:
[image: image]<

https://f.cloud.github.com/assets/231168/2494065/242970cc-b2b5-11e3-9f0d-5bb8d54c030a.png

I already posted a fix for the fa-chevron-left #53<
https://github.com/moodleman/moodle-theme_elegance/issues/53>

It seems, in this issue, that we should remove the extra
fa-chevron-left
icon/char, since YUI already has a "arrow-left" icon.

What do you think?

Reply to this email directly or view it on GitHub<

#52 (comment)

.

Reply to this email directly or view it on GitHub<

#52 (comment)

.

Reply to this email directly or view it on GitHub<
#52 (comment)

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38396978
.

@nadavkav
Copy link
Author

Ok. got it 😄

First, I tried to get the SVG version of the FA https://github.com/FortAwesome/Font-Awesome/tree/master/src/assets/font-awesome/fonts and open it with Inkscape... which did not work. (maybe I need to figure out Inkscape more deeply)

So I went back to CSS... and worked out a reasonable solution:

.jsenabled.dir-rtl .block .block_tree .collapsed .tree_item.branch:before {
    content: "\e079";
    font-family: 'Glyphicons Halflings';
    font-style: normal;
    font-weight: normal;}
.dir-rtl .glyphicon-chevron-right:before {content: "\e079";}
.jsenabled.dir-rtl .block .block_tree .collapsed .tree_item.branch {background-image:none;}

@gjb2048
Copy link
Contributor

gjb2048 commented Mar 23, 2014

But that does not solve the YUI JS issue. What you need to do is create an
SVG from the 'd=' attribute of the glyph tag for the specific character and
transform it into a path tag, the tidy up the file. Then will open in
Inkscape.

http://about.me/gjbarnard

On 23 March 2014 21:58, Nadav Kavalerchik [email protected] wrote:

Ok. got it [image: 😄]

First, I tried to get the SVG version of the FA
https://github.com/FortAwesome/Font-Awesome/tree/master/src/assets/font-awesome/fontsand open it with Inkscape... which did not work. (maybe I need to figure
out Inkscape more deeply)

So I went back to CSS... and worked out a reasonable solution:

.jsenabled.dir-rtl .block .block_tree .collapsed .tree_item.branch:before {
content: "\e079";
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;}
.dir-rtl .glyphicon-chevron-right:before {content: "\e079";}
.jsenabled.dir-rtl .block .block_tree .collapsed .tree_item.branch {background-image:none;}

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38398896
.

@nadavkav
Copy link
Author

Indeed it does not. It just hide the YUI icon and show the correct FA icon
for RTL.
I will try to figure out Inkscape and upload an image as you suggested, too.

On 24 March 2014 01:16, Gareth J Barnard [email protected] wrote:

But that does not solve the YUI JS issue. What you need to do is create an
SVG from the 'd=' attribute of the glyph tag for the specific character and
transform it into a path tag, the tidy up the file. Then will open in
Inkscape.

http://about.me/gjbarnard

On 23 March 2014 21:58, Nadav Kavalerchik [email protected]
wrote:

Ok. got it [image: 😄]

First, I tried to get the SVG version of the FA

https://github.com/FortAwesome/Font-Awesome/tree/master/src/assets/font-awesome/fontsandopen it with Inkscape... which did not work. (maybe I need to figure
out Inkscape more deeply)

So I went back to CSS... and worked out a reasonable solution:

.jsenabled.dir-rtl .block .block_tree .collapsed
.tree_item.branch:before {
content: "\e079";
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;}
.dir-rtl .glyphicon-chevron-right:before {content: "\e079";}
.jsenabled.dir-rtl .block .block_tree .collapsed .tree_item.branch
{background-image:none;}

Reply to this email directly or view it on GitHub<
#52 (comment)

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/52#issuecomment-38401346
.

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