? Success

User tests: Successful: Unsuccessful:

avatar bertmert
bertmert
24 May 2015

Just a nice to have. PR adds an additional class to BODY tag of template Protostar depending on direction of current language.

dir-rtl for languages right to left
dir-ltr for languages left to right

Especially with LESS it's easier then to define direction specific CSS in a collecting block

Before patch

<body class="site com_content view-article no-layout no-task itemid-435">

Patch applied

<body class="site com_content view-article no-layout no-task itemid-435 dir-ltr">
avatar bertmert bertmert - open - 24 May 2015
avatar brianteeman
brianteeman - comment - 24 May 2015

As it is already set in the < html > tag is this really needed?

On 24 May 2015 at 09:36, bertmert notifications@github.com wrote:

Just a nice to have. PR adds an additional class to BODY tag of template
Protostar depending on direction of current language.

dir-rtl for languages right to left
dir-ltr for languages left to right

Especially with LESS it's easier then to define direction specific CSS in
a collecting block

Before patch

Patch applied


You can view, comment on, or merge this pull request online at:

#7023
Commit Summary

  • CSS class dir-ltr or dir-rtl in BODY tag

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#7023.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 24 May 2015

http://www.w3.org/TR/html401/struct/dirlang.html#blocklevel-bidi

The specification states that this should be set first in the html tag AND you only set it again in the document when you want to override that setting.

So for example in my hebrew web site it is enough to set dir=rtl once in the < html > tag and if I have a paragraph in english within the doc I would set < p dir=ltr >

I dont see the value/need/reason/purpose for setting it in the body class if it is the same as the document


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7023.

avatar bertmert
bertmert - comment - 24 May 2015

It's just meant for collecting CSS styles in 2 blocks, e.g. in custom css.

It's a class not an information attribute Thus you can declare things like

body.dir-rtl .nav ul{
 padding-left: 10px;
 padding-right: 0;
}

body.dir-ltr .nav ul{
 padding-left: 0px;
 padding-right: 10px;
}

In LESS you can use it more elegant by using

body.dir-rtl{
 All custom declarations of sub tags for rtl here.
}

body.dir-ltr{
 All custom declarations of sub tags for ltr here.
}

As I said just a nice to have.

avatar brianteeman
brianteeman - comment - 24 May 2015

If you install an RTL language then bootstrap-rtl.css is already loaded

On 24 May 2015 at 10:53, bertmert notifications@github.com wrote:

It's just meant for collecting CSS styles in 2 blocks, e.g. in custom css.

It's a class not an information attribute Thus you can declare things like

body.dir-rtl .nav ul{
padding-left: 10px;
padding-right: 0;
}

body.dir-ltr .nav ul{
padding-left: 0px;
padding-right: 10px;
}

In LESS you can use it more elegant by using

body.dir-rtl{
All custom declarations of sub tags for rtl here.
}

body.dir-ltr{
All custom declarations of sub tags for ltr here.
}

As I said just a nice to have.


Reply to this email directly or view it on GitHub
#7023 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar zero-24 zero-24 - change - 24 May 2015
Status New Pending
avatar zero-24 zero-24 - change - 24 May 2015
Category RTL Templates (site)
avatar zero-24 zero-24 - change - 24 May 2015
Labels Added: ?
avatar bertmert bertmert - change - 25 May 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-05-25 03:11:58
Closed_By bertmert
avatar bertmert bertmert - close - 25 May 2015

Add a Comment

Login with GitHub to post a comment