inline-text-styles.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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 3.0.1">
  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">JME</span>
  117. <ul class="versions">
  118. <li class="version">
  119. <a href="../docs/3.8/documentation.html">3.8</a>
  120. </li>
  121. <li class="version">
  122. <a href="../docs/3.4/documentation.html">3.4</a>
  123. </li>
  124. <li class="version">
  125. <a href="../docs/3.3/documentation.html">3.3</a>
  126. </li>
  127. <li class="version">
  128. <a href="../docs/3.2/documentation.html">3.2</a>
  129. </li>
  130. </ul>
  131. </li>
  132. <li class="component">
  133. <span class="title">Wiki Contribution</span>
  134. <ul class="versions">
  135. <li class="version">
  136. <a href="../docs-wiki/3.8/wiki_contributor.html">3.8</a>
  137. </li>
  138. </ul>
  139. </li>
  140. <li class="component is-current">
  141. <span class="title">Wiki UI</span>
  142. <ul class="versions">
  143. <li class="version is-current">
  144. <a href="index.html">master</a>
  145. </li>
  146. </ul>
  147. </li>
  148. </ul>
  149. </div>
  150. </div>
  151. </aside>
  152. </div>
  153. <main class="article">
  154. <div class="toolbar" role="navigation">
  155. <button class="nav-toggle"></button>
  156. <nav class="breadcrumbs" aria-label="breadcrumbs">
  157. <ul>
  158. <li><a href="index.html">Wiki UI</a></li>
  159. <li><a href="style-guide.html">UI Element Styles</a></li>
  160. <li><a href="inline-text-styles.html">Inline Text</a></li>
  161. </ul>
  162. </nav>
  163. <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>
  164. </div>
  165. <div class="content">
  166. <article class="doc">
  167. <h1 class="page">Inline Text Styles</h1>
  168. <div id="preamble">
  169. <div class="sectionbody">
  170. <div class="paragraph">
  171. <p>This page describes how to style text in the contents of the page which is visually emphasized.</p>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="sect1">
  176. <h2 id="bold"><a class="anchor" href="#bold"></a>Bold text (&lt;strong&gt;)</h2>
  177. <div class="sectionbody">
  178. <div class="paragraph">
  179. <p>How <a href="#antora:asciidoc:bold.adoc" class="xref 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>
  180. </div>
  181. <div class="listingblock">
  182. <div class="content">
  183. <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>
  184. </div>
  185. </div>
  186. <div class="paragraph">
  187. <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.
  188. 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>
  189. </div>
  190. <div class="paragraph">
  191. <p>In the default UI, the <code>&lt;strong&gt;</code> element is styled in the 500 font weight of the current typeface (Roboto).
  192. For example:</p>
  193. </div>
  194. <div class="exampleblock">
  195. <div class="content">
  196. A bold <strong>word</strong>, or a bold <strong>phrase of text</strong>.
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="sect1">
  202. <h2 id="italic"><a class="anchor" href="#italic"></a>Italic text (&lt;em&gt;)</h2>
  203. <div class="sectionbody">
  204. <div class="paragraph">
  205. <p>How <a href="#antora:asciidoc:italic.adoc" class="xref 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>
  206. </div>
  207. <div class="listingblock">
  208. <div class="content">
  209. <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>
  210. </div>
  211. </div>
  212. <div class="paragraph">
  213. <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.
  214. 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>
  215. </div>
  216. <div class="paragraph">
  217. <p>In the default UI, the <code>em</code> element is styled in the italic font variant of the current typeface (Roboto).
  218. For example:</p>
  219. </div>
  220. <div class="exampleblock">
  221. <div class="content">
  222. An italic <em>word</em>, or an italic <em>phrase of text</em>.
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. <div class="sect1">
  228. <h2 id="monospace"><a class="anchor" href="#monospace"></a>Monospace text (&lt;code&gt;)</h2>
  229. <div class="sectionbody">
  230. <div class="paragraph">
  231. <p>How <a href="#antora:asciidoc:monospace.adoc" class="xref 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>
  232. </div>
  233. <div class="listingblock">
  234. <div class="content">
  235. <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>
  236. </div>
  237. </div>
  238. <div class="paragraph">
  239. <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.
  240. 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>
  241. </div>
  242. <div class="paragraph">
  243. <p>In the default UI, the <code>code</code> element is styled using the fixed-width font loaded by the stylesheet (Roboto Mono).
  244. For example:</p>
  245. </div>
  246. <div class="exampleblock">
  247. <div class="content">
  248. A monospace <code>word</code>, or a monospace <code>phrase of text</code>.
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. <div class="sect1">
  254. <h2 id="highlight"><a class="anchor" href="#highlight"></a>Highlighted text (&lt;mark&gt;)</h2>
  255. <div class="sectionbody">
  256. <div class="paragraph">
  257. <p>How <a href="#antora:asciidoc:highlight.adoc" class="xref 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>
  258. </div>
  259. <div class="listingblock">
  260. <div class="content">
  261. <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>
  262. </div>
  263. </div>
  264. <div class="paragraph">
  265. <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.
  266. Here&#8217;s an example:</p>
  267. </div>
  268. <div class="exampleblock">
  269. <div class="content">
  270. Let&#8217;s add some <mark>highlight</mark> to it.
  271. </div>
  272. </div>
  273. <div class="paragraph">
  274. <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>
  275. </div>
  276. </div>
  277. </div>
  278. <nav class="pagination">
  279. <span class="prev"><a href="style-guide.html">UI Element Styles</a></span>
  280. <span class="next"><a href="admonition-styles.html">Admonitions</a></span>
  281. </nav>
  282. </article>
  283. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  284. <div class="toc-menu"></div>
  285. </aside>
  286. </div>
  287. </main>
  288. </div>
  289. <footer class="footer">
  290. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  291. </footer>
  292. <script src="../_/js/vendor/docsearch.min.js"></script>
  293. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  294. <script>
  295. var search = docsearch({
  296. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  297. indexName: 'jmonkeyengine',
  298. inputSelector: '#search-input',
  299. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  300. algoliaOptions: { hitsPerPage: 10 }
  301. }).autocomplete
  302. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  303. function focusSearchInput () { document.querySelector('#search-input').focus() }
  304. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  305. </script>
  306. <script src="../_/js/site.js"></script>
  307. <script async src="../_/js/vendor/highlight.js"></script>
  308. </body>
  309. </html>