Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
[Solved] How to modify text with css ?
Avatar
Dodakei #1
Member since May 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: [Solved] How to modify text with css ?
(excuse for my english)

Hi,

I'm preparing a little site with littel stories with dokuwiki.

My plugin is blog and others, and my template is bootstrap3.

The site is at https://drivrsdu.fr/toutfaux/start

I would like change the style of articles text, without change administration text.

I've done, in userall.css

div.dokuwiki div.level1
{
    color: #71340f;
    font-size: 200%;
    text-align: center;
}

But that change all texts anywhere. How can I change only style text in articles ?

Thanks for your help.
This post was edited on 2018-09-12, 08:20 by Dodakei.
Avatar
LarsDW223 #2
Member since Sep 2014 · 344 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
The only solution I found so far is this:

div.dw-content div.level1
{
    color: #71340f;
    font-size: 200%;
    text-align: center;
}

div.ui-admin div.level1
{
    color: __text__;
    font-size: 100%;
    text-align: left;
}
Avatar
Dodakei #3
Member since May 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
Thank you for your help, but that doesn't work for me.

There is no "ui-admin" class on my admin page (start?do=admin&page=config).
Avatar
Samana Johann #4
Member since Jun 2018 · 123 posts · Location: Aural/Cambodia
Group memberships: Members
Show profile · Link to this post
My person has no such as an inspector, actually having same issues (with <p> ), but just theoretical: try to find out the div of the content at pages and include it in the specific match dodakei.
Avatar
LarsDW223 #5
Member since Sep 2014 · 344 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
Ooops, my fault. The div with class ui-admin is only present on the main admin menu. Please try this adjusted version:

body.mode_show div.level1
{
    color: #71340f;
    font-size: 200%;
    text-align: center;
}

body.mode_admin div.level1
{
    color: __text__;
    font-size: 100%;
    text-align: left;
}

This hopefully works on all admin sub-pages like "Configuration settings", "Template Style Settings" and so on. Also please notice, that the CSS code above will only have an effect on texts under a level 1 headline. If you want to change all text on a page - no matter what headline level - then use this CSS code:

body.mode_show div.dw-content
{
    color: #71340f;
    font-size: 200%;
    text-align: center;
}

body.mode_admin div.dw-content
{
    color: __text__;
    font-size: 100%;
    text-align: left;
}
Avatar
Dodakei #6
Member since May 2017 · 11 posts
Group memberships: Members
Show profile · Link to this post
It's works ! Planty of thanks !

... but I'm not a css expert, what is that : "color: __text__;" ?

Thanks again.
Avatar
LarsDW223 #7
Member since Sep 2014 · 344 posts · Location: Paderborn
Group memberships: Members
Show profile · Link to this post
... but I'm not a css expert, what is that : "color: __text__;" ?

This is actually not pure CSS. The part __text__ is a placeholder for a color value defined in the file style.ini. On generation of the CSS code a LESS parser is used to replace this "CSS variables" with a valid CSS value (there are no variables in CSS and for this reason (and others) LESS was invented to fill that gap).

For a deeper explanation please see:
- https://www.dokuwiki.org/devel:style.ini
- https://www.dokuwiki.org/devel:less#accessing_styleini_pla…

Please mark this thread as solved by adding the prefix [Solved] to the title.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-12-14, 04:16:02 (UTC +01:00)