You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the <var> element is not addressed by PicoCSS (at least as far as version 2.1.1).
Background:
<var> represents a symbol whose value can vary and is stylistically similar to the <code>,<samp> and <kbd> elements, but under PicoCSS, it currently has no styling other than the browser defaults.
As one of the five HTML text-level elements for code and computer-related content (<code>, <var>, <kbd>, <samp>, and <pre>), defaults for <var> are generally the same as <code>, <samp>, and <kbd>. The few differences (a larger, italicized serif font) are listed in a CSS block below, but otherwise, the style PicoCSS uses on the other three elements would be a great match for <var>.
It's of great use to anyone who writes HTML content about math and programming, and as someone who frequently writes programming articles (and is in the middle of switching to PicoCSS), I'd love to have this wrapped into the source rather than having to add my own separate styles for <var>.
My request:
Please include var in the same declaration blocks where you define samp, so that it inherits PicoCSS’s existing code-element styling.
Someone might suggest, "just use <samp> or <code> instead," but consistent semantic meaning in HTML markup is very important to me and others, especially when providing javascript interactions where readers might test variables directly to see different results.
Default Browser Style Differences between <var> and <code>/<samp>/<kbd>:
These are the only differences between <var> and the other elements in the default browser styles:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The Problem:
Currently, the
<var>
element is not addressed by PicoCSS (at least as far as version 2.1.1).Background:
<var>
represents a symbol whose value can vary and is stylistically similar to the<code>
,<samp>
and<kbd>
elements, but under PicoCSS, it currently has no styling other than the browser defaults.As one of the five HTML text-level elements for code and computer-related content (
<code>
,<var>
,<kbd>
,<samp>
, and<pre>
), defaults for<var>
are generally the same as<code>
,<samp>
, and<kbd>
. The few differences (a larger, italicized serif font) are listed in a CSS block below, but otherwise, the style PicoCSS uses on the other three elements would be a great match for<var>
.It's of great use to anyone who writes HTML content about math and programming, and as someone who frequently writes programming articles (and is in the middle of switching to PicoCSS), I'd love to have this wrapped into the source rather than having to add my own separate styles for
<var>
.My request:
Please include
var
in the same declaration blocks where you definesamp
, so that it inherits PicoCSS’s existing code-element styling.Someone might suggest, "just use
<samp>
or<code>
instead," but consistent semantic meaning in HTML markup is very important to me and others, especially when providing javascript interactions where readers might test variables directly to see different results.Default Browser Style Differences between
<var>
and<code>
/<samp>
/<kbd>
:These are the only differences between
<var>
and the other elements in the default browser styles:How I'm currently mitigating the problem:
Currently, I need to add the following custom CSS to make
<var>
conform to PicoCSS styling:Additionally, I remove the default italic styling as well with
font-style: inherit
, but that is a personal choice.Please consider this addition. I think it would make PicoCSS’s code-related element support complete and consistent.
Beta Was this translation helpful? Give feedback.
All reactions