Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
How to add your own style name to the link?
Avatar
wfsdaj #1
Member since Jul 2019 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to add your own style name to the link?
Excuse me, How to add a custom style name to a link like this?

<a href="/doku.php?id=start&do=profile" class="menuitem profile">menu</a>

I want to change to this

<a href="/doku.php?id=start&do=profile" class="menuitem profile [color=crimson]custom-class-name[/color]">menu</a>

That is, how to customize the link style?
Avatar
Aleksandr #2
Member since Mar 2010 · 574 posts · Location: Volgograd, Russia
Group memberships: Members
Show profile · Link to this post
https://www.dokuwiki.org/devel:css#user_styles
ru: Пожалуйста, избегайте избыточного цитирования.
en: Don’t use an overquoting, please.
Avatar
wfsdaj #3
Member since Jul 2019 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thank you for your reply.

I mean, this is the default link style generated by the dokuwiki function tpl_actionlink, It has the default style name "action profile". How can I change this style name to one defined by myself?

[Image: https://i.loli.net/2020/02/03/GOVM9RAPlK7IExF.png]
Avatar
Aleksandr #4
Member since Mar 2010 · 574 posts · Location: Volgograd, Russia
Group memberships: Members
Show profile · Link to this post
  1. #dokuwiki__usertools li.action.profile a {
  2.     color: crimson !important;
  3. }
ru: Пожалуйста, избегайте избыточного цитирования.
en: Don’t use an overquoting, please.
Avatar
ach (Administrator) #5
Member since May 2006 · 1956 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
In case you're using a framework that you don't have any control over, you can also make the CSS class automatically inherit that framework's class attributes. That only works when using the .less extension for your userstyles. Like so:
  1. .menuitem.profile {
  2.     .custom-class-name;
  3. }
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: 2020-02-17, 07:15:53 (UTC +01:00)