HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

RTL CSS Tweaks [p1]

MohamedHMohamedH
edited October 2013 in Feedback

couldn't post this at tutorial that's why I'm posting it here.

This is the main css RTL quick tweaks for Vanilla 2. Feel free to add any extra info to the post.

This will effect the default style.css and hopefully will work with other themes without the need to modify them, in this case I tested it on "Dark Mist" and it worked perfectly. (see attachment)

open

applications/dashboard/design/style.css
::::::::::::::::::::::::::::::

::::::::[Start]::::::::::
Look For

#Body {

Replace
text-align: left;
with
text-align: right;
:::::::::[End]:::::::::::::::

::::::::[Start]::::::::::
Look For

.DataList a.Title

Insert
text-align: right;
font-family: arial;

:::::::::[End]:::::::::::::::

::::::::[Start]::::::::::
Look For

.DataList .Options,
.MessageList .Options

Replace
right: 0;
with
left: 0;
:::::::::[End]:::::::::::::::

::::::::[Start]::::::::::
Look For

.Drafts .ItemContent a.Title,
.Discussions .ItemContent a.Title

Change Value
max-width: 580px;
To
max-width: 98%;
:::::::::[End]:::::::::::::::

::::::::[Start]::::::::::
Look For

input.BigInput {
Add value
text-align: right;
:::::::::[End]:::::::::::::::

Tagged:

Comments

  • applications/dashboard/design/style.css ::::::::::::::::::::::::::::::

    Nice tut however there is no reason to edit the core. Your changes will last as long your next update. Don't edit core files full stop, it can get you in a world of trouble ans also you are technically maintaining a themes, which mean you might as well make your own support forum instead of http://vanillaforums.org to go with it (of course I exaggerate, but if you are forking software you are making a conscious choice to diverge from vanillas versions).

    Put any change in custom.css of your theme, or you can include another stylesheet through themehooks or pluign, that is how you do it properly.

    CSS is called cascading for a reason. You can apply styles after following the same hierarchy rules.

    Btw sorry for picking on you, but I trying to get people editing a the core files when it is not necessary, however big or small.

    grep is your friend.

  • MohamedHMohamedH
    edited October 2013

    You're right x00, editing core files is not a good practice. In my case I did it because it will always effect any theme I install or download without the need to modify the theme downloaded.

    Yes, i could apply the change to every theme i download.

    or

    I could apply the change to the master template that will automatically effect every single theme without the need to touch them.

    RTL is only direction and position and does not effect the look of the theme. There is a way to make that automated (which is not yet implemented in Vanilla) by adding ( rtl.css ) to the core files initiated when the rtl value is turned on in Vanilla.

    Again thanks for your feedback and you're absolutely right in regard to altering core files.

  • hgtonighthgtonight ∞ · New Moderator

    @MohamedH You could package it as a plugin and add it to your site regardless of theme. No hacking of the core required :D.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • A true master template effect by plugin sounds really cool, I would look into it. Thanks hgtonight.

  • Hello,

    Here is an online tool to change all the CSS codes from LTR to RTL, and viceversa:

    http://rtl-css.com

  • plugin package instead or the modifying the core

    http://vanillaforums.org/discussion/27500/rtl-plugin?new=1

Sign In or Register to comment.