Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Looking for "(optional)" in CSS [solved]
Hi,
I cannot find the css entry which defines the "(optional)" in "Whisper your comments to (optional)". Could anyone please tell me where the colour and font-size of this element is defined?
Thanks,
Tex
0
This discussion has been closed.
Comments
<label for="WhisperUsername">Whisper your comments to <small>(optional)</small></label>
which means the way it looks is governed by the FORM definition
(it does not have its own class or ID)
To change it you can either change the #Form * definition
(starts at line 949 in my vanilla.css, but may depend on your style)
Alternatively (not very clean, but allows more leeway if you want only
THAT specific label in the form to change) you can add it in your
/conf/language/php definitions, for instance this will make
it red, 24px.
$Context->Dictionary['WhisperYourCommentsTo'] = '<span style="color:red;font-size:24px;">Whisper only to</span> <small>(optional)</small>';
#Form.StartDiscussion label, #Form.AddComments label { display: block; width: 100%; color: rgb(131, 67, 0); font-weight: bold; }
To quote code use <code> and </code> around the code
and/or /themes/vanilla/{yourstylehere}/vanilla.css
Vanilla is very good at separating content from display I find...
You should either do someting like:
#Form.StartDiscussion label small { /*you styling here*/ }
Or to be more specific, add a class or id to the span in the theme file, then add the relevant styling:
the theme:
<small class="optional">(optional)</small>
or<small id="optional">(optional)</small>
the style:
[small].optional { /*you styling here*/ }
or#optional { /*you styling here*/ }
Your solution is the best one for changing the styling of (optional).
Was not sure what Tex was looking for (text change, font change, etc).
Can you tell me how you'd like that to show/change exactly?
I all you want is "(optional)" looks like the rest of the label, just remove this tag from the language file, saving the original line as a comment for information.