User tests: Successful: Unsuccessful:
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">
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
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.
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/
Status | New | ⇒ | Pending |
Category | ⇒ | RTL Templates (site) |
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-25 03:11:58 |
Closed_By | ⇒ | bertmert |
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:
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/