inline-text-styles.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Inline Text Styles :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/wiki-ui/inline-text-styles.html">
  8. <link rel="prev" href="style-guide.html">
  9. <link rel="next" href="admonition-styles.html">
  10. <meta name="generator" content="Antora 2.3.3">
  11. <link rel="stylesheet" href="../_/css/site.css">
  12. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  13. <meta property="og:description" content="Inline Text Styles">
  14. <meta property="og:title" content="jMonkeyEngine Docs">
  15. <link rel="stylesheet" href="../_/css/site-extra.css">
  16. <link rel="stylesheet" href="../_/css/vendor/docsearch.min.css">
  17. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
  18. <link rel="icon" href="../_/img/favicon.ico" type="image/x-icon">
  19. </head>
  20. <body class="article">
  21. <header class="header">
  22. <nav class="navbar">
  23. <div class="navbar-brand">
  24. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  25. <img alt="" src="../_/img/jme-logo.png" height="32" type="image/x-icon">
  26. </a>
  27. <div class="navbar-item hide-for-print">
  28. <input id="search-input" type="text" placeholder="Search docs">
  29. </div>
  30. <button class="navbar-burger" data-target="topbar-nav">
  31. <span></span>
  32. <span></span>
  33. <span></span>
  34. </button>
  35. </div>
  36. <div id="topbar-nav" class="navbar-menu">
  37. <div class="navbar-end">
  38. <div class="navbar-item theme-switch-wrapper">
  39. <label class="theme-switch" for="checkbox">
  40. <input type="checkbox" id="checkbox" />
  41. <div class="slider round"></div>
  42. </label>
  43. </div>
  44. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  45. </div>
  46. </div>
  47. </nav>
  48. </header>
  49. <div class="body">
  50. <div class="nav-container" data-component="wiki-ui" data-version="master">
  51. <aside class="nav">
  52. <div class="panels">
  53. <div class="nav-panel-menu is-active" data-panel="menu">
  54. <nav class="nav-menu">
  55. <h3 class="title"><a href="index.html">Wiki UI</a></h3>
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="0">
  58. <ul class="nav-list">
  59. <li class="nav-item" data-depth="1">
  60. <a class="nav-link" href="prerequisites.html">UI Development Prerequisites</a>
  61. </li>
  62. <li class="nav-item" data-depth="1">
  63. <a class="nav-link" href="set-up-project.html">Set up a UI Project</a>
  64. </li>
  65. <li class="nav-item" data-depth="1">
  66. <a class="nav-link" href="build-preview-ui.html">Build and Preview the UI</a>
  67. </li>
  68. <li class="nav-item" data-depth="1">
  69. <a class="nav-link" href="development-workflow.html">UI Development Workflow</a>
  70. </li>
  71. <li class="nav-item" data-depth="1">
  72. <a class="nav-link" href="templates.html">Work with the Handlebars Templates</a>
  73. </li>
  74. <li class="nav-item" data-depth="1">
  75. <button class="nav-item-toggle"></button>
  76. <a class="nav-link" href="stylesheets.html">Work with the CSS Stylesheets</a>
  77. <ul class="nav-list">
  78. <li class="nav-item" data-depth="2">
  79. <a class="nav-link" href="add-fonts.html">Add Fonts</a>
  80. </li>
  81. </ul>
  82. </li>
  83. <li class="nav-item" data-depth="1">
  84. <button class="nav-item-toggle"></button>
  85. <a class="nav-link" href="style-guide.html">UI Element Styles</a>
  86. <ul class="nav-list">
  87. <li class="nav-item is-current-page" data-depth="2">
  88. <a class="nav-link" href="inline-text-styles.html">Inline Text</a>
  89. </li>
  90. <li class="nav-item" data-depth="2">
  91. <a class="nav-link" href="admonition-styles.html">Admonitions</a>
  92. </li>
  93. <li class="nav-item" data-depth="2">
  94. <a class="nav-link" href="list-styles.html">Lists</a>
  95. </li>
  96. <li class="nav-item" data-depth="2">
  97. <a class="nav-link" href="sidebar-styles.html">Sidebars</a>
  98. </li>
  99. <li class="nav-item" data-depth="2">
  100. <a class="nav-link" href="ui-macro-styles.html">UI Macros</a>
  101. </li>
  102. </ul>
  103. </li>
  104. </ul>
  105. </li>
  106. </ul>
  107. </nav>
  108. </div>
  109. <div class="nav-panel-explore" data-panel="explore">
  110. <div class="context">
  111. <span class="title">Wiki UI</span>
  112. <span class="version">master</span>
  113. </div>
  114. <ul class="components">
  115. <li class="component">
  116. <span class="title">Docs</span>
  117. <ul class="versions">
  118. <li class="version is-latest">
  119. <a href="../docs/documentation.html">master</a>
  120. </li>
  121. </ul>
  122. </li>
  123. <li class="component is-current">
  124. <span class="title">Wiki UI</span>
  125. <ul class="versions">
  126. <li class="version is-current is-latest">
  127. <a href="index.html">master</a>
  128. </li>
  129. </ul>
  130. </li>
  131. </ul>
  132. </div>
  133. </div>
  134. </aside>
  135. </div>
  136. <main class="article">
  137. <div class="toolbar" role="navigation">
  138. <button class="nav-toggle"></button>
  139. <nav class="breadcrumbs" aria-label="breadcrumbs">
  140. <ul>
  141. <li><a href="index.html">Wiki UI</a></li>
  142. <li><a href="style-guide.html">UI Element Styles</a></li>
  143. <li><a href="inline-text-styles.html">Inline Text</a></li>
  144. </ul>
  145. </nav>
  146. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki-ui/edit/master/docs/modules/ROOT/pages/inline-text-styles.adoc">Edit this Page</a></div>
  147. </div>
  148. <div class="content">
  149. <article class="doc">
  150. <h1 class="page">Inline Text Styles</h1>
  151. <div id="preamble">
  152. <div class="sectionbody">
  153. <div class="paragraph">
  154. <p>This page describes how to style text in the contents of the page which is visually emphasized.</p>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="sect1">
  159. <h2 id="bold"><a class="anchor" href="#bold"></a>Bold text (&lt;strong&gt;)</h2>
  160. <div class="sectionbody">
  161. <div class="paragraph">
  162. <p>How <a href="#antora:asciidoc:bold.adoc" class="page unresolved">text marked as bold</a> appears on your site depends on the fonts loaded by the UI and the CSS styles the UI applies to the <code>&lt;strong&gt;</code> HTML tag.</p>
  163. </div>
  164. <div class="listingblock">
  165. <div class="content">
  166. <pre class="highlightjs highlight"><code class="language-html hljs" data-lang="html">A bold &lt;strong&gt;word&lt;/strong&gt;, or a bold &lt;strong&gt;phrase of text&lt;/strong&gt;.</code></pre>
  167. </div>
  168. </div>
  169. <div class="paragraph">
  170. <p>Since <code>&lt;strong&gt;</code> is a semantic HTML element, it automatically inherits default styling (<code>font-weight: bold</code>) from the browser.
  171. If you want to override the browser styles, you&#8217;ll need to define properties on the <code>strong</code> selector in the stylesheet for your UI.</p>
  172. </div>
  173. <div class="paragraph">
  174. <p>In the default UI, the <code>&lt;strong&gt;</code> element is styled in the 500 font weight of the current typeface (Roboto).
  175. For example:</p>
  176. </div>
  177. <div class="exampleblock">
  178. <div class="content">
  179. A bold <strong>word</strong>, or a bold <strong>phrase of text</strong>.
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. <div class="sect1">
  185. <h2 id="italic"><a class="anchor" href="#italic"></a>Italic text (&lt;em&gt;)</h2>
  186. <div class="sectionbody">
  187. <div class="paragraph">
  188. <p>How <a href="#antora:asciidoc:italic.adoc" class="page unresolved">italicized text</a> appears on your site depends on the fonts loaded by the UI and the CSS styles the UI applies to the <code>&lt;em&gt;</code> HTML tag.</p>
  189. </div>
  190. <div class="listingblock">
  191. <div class="content">
  192. <pre class="highlightjs highlight"><code class="language-html hljs" data-lang="html">An italic &lt;em&gt;word&lt;/em&gt;, or an italic &lt;em&gt;phrase of text&lt;/em&gt;.</code></pre>
  193. </div>
  194. </div>
  195. <div class="paragraph">
  196. <p>Since <code>&lt;em&gt;</code> is a semantic HTML element, it automatically inherits default styling (<code>font-style: italic</code>) from the browser.
  197. If you want to override the browser styles, you&#8217;ll need to define properties on the <code>em</code> selector in the stylesheet for your UI.</p>
  198. </div>
  199. <div class="paragraph">
  200. <p>In the default UI, the <code>em</code> element is styled in the italic font variant of the current typeface (Roboto).
  201. For example:</p>
  202. </div>
  203. <div class="exampleblock">
  204. <div class="content">
  205. An italic <em>word</em>, or an italic <em>phrase of text</em>.
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. <div class="sect1">
  211. <h2 id="monospace"><a class="anchor" href="#monospace"></a>Monospace text (&lt;code&gt;)</h2>
  212. <div class="sectionbody">
  213. <div class="paragraph">
  214. <p>How <a href="#antora:asciidoc:monospace.adoc" class="page unresolved">inline monospace text</a> is displayed depends on the fixed-width font loaded by your UI and the CSS styles it applies to the <code>&lt;code&gt;</code> HTML tag.</p>
  215. </div>
  216. <div class="listingblock">
  217. <div class="content">
  218. <pre class="highlightjs highlight"><code class="language-html hljs" data-lang="html">A monospace &lt;code&gt;word&lt;/code&gt;, or a monospace &lt;code&gt;phrase of text&lt;/code&gt;.</code></pre>
  219. </div>
  220. </div>
  221. <div class="paragraph">
  222. <p>Since <code>&lt;code&gt;</code> is a semantic HTML element, it automatically inherits default styling (<code>font-family: monospace</code>) from the browser.
  223. If you want to override the browser styles, you&#8217;ll need to define properties on the <code>code</code> selector in the stylesheet for your UI.</p>
  224. </div>
  225. <div class="paragraph">
  226. <p>In the default UI, the <code>code</code> element is styled using the fixed-width font loaded by the stylesheet (Roboto Mono).
  227. For example:</p>
  228. </div>
  229. <div class="exampleblock">
  230. <div class="content">
  231. A monospace <code>word</code>, or a monospace <code>phrase of text</code>.
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. <div class="sect1">
  237. <h2 id="highlight"><a class="anchor" href="#highlight"></a>Highlighted text (&lt;mark&gt;)</h2>
  238. <div class="sectionbody">
  239. <div class="paragraph">
  240. <p>How <a href="#antora:asciidoc:highlight.adoc" class="page unresolved">highlighted (or marked) text</a> appears on your site depends on the CSS styles the UI applies to the <code>&lt;mark&gt;</code> HTML tag.</p>
  241. </div>
  242. <div class="listingblock">
  243. <div class="content">
  244. <pre class="highlightjs highlight"><code class="language-html hljs" data-lang="html">Let&amp;#8217;s add some &lt;mark&gt;highlight&lt;/mark&gt; to it.</code></pre>
  245. </div>
  246. </div>
  247. <div class="paragraph">
  248. <p>Since <code>&lt;mark&gt;</code> is a semantic HTML element, it automatically inherits default styling (<code>background-color: yellow</code>) from the browser.
  249. Here&#8217;s an example:</p>
  250. </div>
  251. <div class="exampleblock">
  252. <div class="content">
  253. Let&#8217;s add some <mark>highlight</mark> to it.
  254. </div>
  255. </div>
  256. <div class="paragraph">
  257. <p>If you want to override the browser styles, you&#8217;ll need to define properties on the <code>mark</code> selector in the stylesheet for your UI.</p>
  258. </div>
  259. </div>
  260. </div>
  261. <nav class="pagination">
  262. <span class="prev"><a href="style-guide.html">UI Element Styles</a></span>
  263. <span class="next"><a href="admonition-styles.html">Admonitions</a></span>
  264. </nav>
  265. </article>
  266. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  267. <div class="toc-menu"></div>
  268. </aside>
  269. </div>
  270. </main>
  271. </div>
  272. <footer class="footer">
  273. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  274. </footer>
  275. <script src="../_/js/vendor/docsearch.min.js"></script>
  276. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  277. <script>
  278. var search = docsearch({
  279. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  280. indexName: 'jmonkeyengine',
  281. inputSelector: '#search-input',
  282. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  283. algoliaOptions: { hitsPerPage: 10 }
  284. }).autocomplete
  285. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  286. function focusSearchInput () { document.querySelector('#search-input').focus() }
  287. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  288. </script>
  289. <script src="../_/js/site.js"></script>
  290. <script async src="../_/js/vendor/highlight.js"></script>
  291. </body>
  292. </html>