@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-javascript-menu-items/>
  a sioc:Post ;
  dc:title "Icons" ;
  dcterms:identifier 154386 ;
  dc:modified "2026-11-12T14:54:12Z"^^xsd:dateTime ;
  dc:created "2026-11-12T14:54:12Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-javascript-menu-items/icons/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-javascript-menu-items/">LH Javascript Menu Items</a></li></ul>
<p class="wp-block-paragraph">Each item prints its own icon as inline SVG before its label: Fullscreen, Refresh, Print, Subscribe to RSS (a feed icon) and Wakelock (a crossed-out eye, switching to an open eye while the screen is being kept awake). The icons are <code>aria-hidden</code>, not focusable, and drawn in <code>currentColor</code>, so they take the link&#8217;s text colour. They carry the class <code>lh-jmis-icon</code> and are 1em square, so a theme sizes them with <code>font-size</code>.</p>



<p class="wp-block-paragraph">An item that prints its icon gets the class <code>has-inline-icon</code>. A theme that draws its own menu icons in CSS should skip items with that class, so there is never a double icon. LH 2015 does, and places the SVG where its CSS icon would be.</p>



<p class="wp-block-paragraph">This works in navigation blocks and in classic menus. In the block editor, the variations show their icons in the inserter and the canvas draws them with editor-only CSS; the front end carries no icon CSS.</p>



<p class="wp-block-paragraph">Items that other plugins add through the <code>lh_jmis_return_basic_menu_array</code> filter can supply an icon with an <code>icon</code> key: <code>array( 'viewbox' =&gt; '0 0 16 16', 'path' =&gt; '...' )</code>, optionally with <code>'active' =&gt; array( 'path' =&gt; '...', 'body_class' =&gt; '...' )</code> for a second icon shown while the body has that class. Items without one print no icon and keep whatever the theme draws.</p>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Javascript Menu Items
Each item prints its own icon as inline SVG before its label: Fullscreen, Refresh, Print, Subscribe to RSS (a feed icon) and Wakelock (a crossed-out eye, switching to an open eye while the screen is being kept awake). The icons are aria-hidden, not focusable, and drawn in currentColor, so they take the link&#8217;s text colour. They carry the class lh-jmis-icon and are 1em square, so a theme sizes them with font-size.



An item that prints its icon gets the class has-inline-icon. A theme that draws its own menu icons in CSS should skip items with that class, so there is never a double icon. LH 2015 does, and places the SVG where its CSS icon would be.



This works in navigation blocks and in classic menus. In the block editor, the variations show their icons in the inserter and the canvas draws them with editor-only CSS; the front end carries no icon CSS.



Items that other plugins add through the lh_jmis_return_basic_menu_array filter can supply an icon with an icon key: array( 'viewbox' =&gt; '0 0 16 16', 'path' =&gt; '...' ), optionally with 'active' =&gt; array( 'path' =&gt; '...', 'body_class' =&gt; '...' ) for a second icon shown while the body has that class. Items without one print no icon and keep whatever the theme draws.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1>, <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261112t040000-jmis-icons> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261112t040000-jmis-icons> rdfs:seeAlso <https://lhero.org/?taxonomy=lh_object_key&term=lh-portfolio_doc_20261112t040000-jmis-icons&feed=lhrdf&format=turtle> .
