inline-text-styles.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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="icon" href="../_/img/favicon.ico" type="image/x-icon">
  17. </head>
  18. <body class="article">
  19. <header class="header">
  20. <nav class="navbar">
  21. <div class="navbar-brand">
  22. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  23. <img alt="" src="../_/img/jMonkeyDocLogo.png" height="32" type="image/x-icon">
  24. </a>
  25. <div class="navbar-item hide-for-print">
  26. <input type="text" placeholder="Search docs..." id="search-input"/>
  27. </div>
  28. <button class="navbar-burger" data-target="topbar-nav">
  29. <span></span>
  30. <span></span>
  31. <span></span>
  32. </button>
  33. </div>
  34. <div id="topbar-nav" class="navbar-menu">
  35. <div class="navbar-end">
  36. <div class="navbar-item theme-switch-wrapper">
  37. <label class="theme-switch" for="checkbox">
  38. <input type="checkbox" id="checkbox" />
  39. <div class="slider round"></div>
  40. </label>
  41. </div>
  42. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  43. </div>
  44. </div>
  45. </nav>
  46. </header>
  47. <div class="body">
  48. <div class="nav-container" data-component="wiki-ui" data-version="master">
  49. <aside class="nav">
  50. <div class="panels">
  51. <div class="nav-panel-menu is-active" data-panel="menu">
  52. <nav class="nav-menu">
  53. <h3 class="title"><a href="index.html">Wiki UI</a></h3>
  54. <ul class="nav-list">
  55. <li class="nav-item" data-depth="0">
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="1">
  58. <a class="nav-link" href="prerequisites.html">UI Development Prerequisites</a>
  59. </li>
  60. <li class="nav-item" data-depth="1">
  61. <a class="nav-link" href="set-up-project.html">Set up a UI Project</a>
  62. </li>
  63. <li class="nav-item" data-depth="1">
  64. <a class="nav-link" href="build-preview-ui.html">Build and Preview the UI</a>
  65. </li>
  66. <li class="nav-item" data-depth="1">
  67. <a class="nav-link" href="development-workflow.html">UI Development Workflow</a>
  68. </li>
  69. <li class="nav-item" data-depth="1">
  70. <a class="nav-link" href="templates.html">Work with the Handlebars Templates</a>
  71. </li>
  72. <li class="nav-item" data-depth="1">
  73. <button class="nav-item-toggle"></button>
  74. <a class="nav-link" href="stylesheets.html">Work with the CSS Stylesheets</a>
  75. <ul class="nav-list">
  76. <li class="nav-item" data-depth="2">
  77. <a class="nav-link" href="add-fonts.html">Add Fonts</a>
  78. </li>
  79. </ul>
  80. </li>
  81. <li class="nav-item" data-depth="1">
  82. <button class="nav-item-toggle"></button>
  83. <a class="nav-link" href="style-guide.html">UI Element Styles</a>
  84. <ul class="nav-list">
  85. <li class="nav-item is-current-page" data-depth="2">
  86. <a class="nav-link" href="inline-text-styles.html">Inline Text</a>
  87. </li>
  88. <li class="nav-item" data-depth="2">
  89. <a class="nav-link" href="admonition-styles.html">Admonitions</a>
  90. </li>
  91. <li class="nav-item" data-depth="2">
  92. <a class="nav-link" href="list-styles.html">Lists</a>
  93. </li>
  94. <li class="nav-item" data-depth="2">
  95. <a class="nav-link" href="sidebar-styles.html">Sidebars</a>
  96. </li>
  97. <li class="nav-item" data-depth="2">
  98. <a class="nav-link" href="ui-macro-styles.html">UI Macros</a>
  99. </li>
  100. </ul>
  101. </li>
  102. </ul>
  103. </li>
  104. </ul>
  105. </nav>
  106. </div>
  107. <div class="nav-panel-explore" data-panel="explore">
  108. <div class="context">
  109. <span class="title">Wiki UI</span>
  110. <span class="version">master</span>
  111. </div>
  112. <ul class="components">
  113. <li class="component">
  114. <span class="title">Docs</span>
  115. <ul class="versions">
  116. <li class="version is-latest">
  117. <a href="../docs/documentation.html">master</a>
  118. </li>
  119. </ul>
  120. </li>
  121. <li class="component is-current">
  122. <span class="title">Wiki UI</span>
  123. <ul class="versions">
  124. <li class="version is-current is-latest">
  125. <a href="index.html">master</a>
  126. </li>
  127. </ul>
  128. </li>
  129. </ul>
  130. </div>
  131. </div>
  132. </aside>
  133. </div>
  134. <main class="article">
  135. <div class="toolbar" role="navigation">
  136. <button class="nav-toggle"></button>
  137. <nav class="breadcrumbs" aria-label="breadcrumbs">
  138. <ul>
  139. <li><a href="index.html">Wiki UI</a></li>
  140. <li><a href="style-guide.html">UI Element Styles</a></li>
  141. <li><a href="inline-text-styles.html">Inline Text</a></li>
  142. </ul>
  143. </nav>
  144. <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>
  145. </div>
  146. <div class="content">
  147. <article class="doc">
  148. <h1 class="page">Inline Text Styles</h1>
  149. <div id="preamble">
  150. <div class="sectionbody">
  151. <div class="paragraph">
  152. <p>This page describes how to style text in the contents of the page which is visually emphasized.</p>
  153. </div>
  154. </div>
  155. </div>
  156. <div class="sect1">
  157. <h2 id="bold"><a class="anchor" href="#bold"></a>Bold text (&lt;strong&gt;)</h2>
  158. <div class="sectionbody">
  159. <div class="paragraph">
  160. <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>
  161. </div>
  162. <div class="listingblock">
  163. <div class="content">
  164. <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>
  165. </div>
  166. </div>
  167. <div class="paragraph">
  168. <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.
  169. 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>
  170. </div>
  171. <div class="paragraph">
  172. <p>In the default UI, the <code>&lt;strong&gt;</code> element is styled in the 500 font weight of the current typeface (Roboto).
  173. For example:</p>
  174. </div>
  175. <div class="exampleblock">
  176. <div class="content">
  177. A bold <strong>word</strong>, or a bold <strong>phrase of text</strong>.
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="sect1">
  183. <h2 id="italic"><a class="anchor" href="#italic"></a>Italic text (&lt;em&gt;)</h2>
  184. <div class="sectionbody">
  185. <div class="paragraph">
  186. <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>
  187. </div>
  188. <div class="listingblock">
  189. <div class="content">
  190. <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>
  191. </div>
  192. </div>
  193. <div class="paragraph">
  194. <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.
  195. 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>
  196. </div>
  197. <div class="paragraph">
  198. <p>In the default UI, the <code>em</code> element is styled in the italic font variant of the current typeface (Roboto).
  199. For example:</p>
  200. </div>
  201. <div class="exampleblock">
  202. <div class="content">
  203. An italic <em>word</em>, or an italic <em>phrase of text</em>.
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="sect1">
  209. <h2 id="monospace"><a class="anchor" href="#monospace"></a>Monospace text (&lt;code&gt;)</h2>
  210. <div class="sectionbody">
  211. <div class="paragraph">
  212. <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>
  213. </div>
  214. <div class="listingblock">
  215. <div class="content">
  216. <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>
  217. </div>
  218. </div>
  219. <div class="paragraph">
  220. <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.
  221. 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>
  222. </div>
  223. <div class="paragraph">
  224. <p>In the default UI, the <code>code</code> element is styled using the fixed-width font loaded by the stylesheet (Roboto Mono).
  225. For example:</p>
  226. </div>
  227. <div class="exampleblock">
  228. <div class="content">
  229. A monospace <code>word</code>, or a monospace <code>phrase of text</code>.
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. <div class="sect1">
  235. <h2 id="highlight"><a class="anchor" href="#highlight"></a>Highlighted text (&lt;mark&gt;)</h2>
  236. <div class="sectionbody">
  237. <div class="paragraph">
  238. <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>
  239. </div>
  240. <div class="listingblock">
  241. <div class="content">
  242. <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>
  243. </div>
  244. </div>
  245. <div class="paragraph">
  246. <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.
  247. Here&#8217;s an example:</p>
  248. </div>
  249. <div class="exampleblock">
  250. <div class="content">
  251. Let&#8217;s add some <mark>highlight</mark> to it.
  252. </div>
  253. </div>
  254. <div class="paragraph">
  255. <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>
  256. </div>
  257. </div>
  258. </div>
  259. <nav class="pagination">
  260. <span class="prev"><a href="style-guide.html">UI Element Styles</a></span>
  261. <span class="next"><a href="admonition-styles.html">Admonitions</a></span>
  262. </nav>
  263. </article>
  264. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  265. <div class="toc-menu"></div>
  266. </aside>
  267. </div>
  268. </main>
  269. </div>
  270. <footer class="footer">
  271. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  272. </footer>
  273. <script src="../_/js/site.js"></script>
  274. <script async src="../_/js/vendor/highlight.js"></script>
  275. </body>
  276. </html>