aboutsummaryrefslogtreecommitdiff
path: root/docs/4.0/content/code.md
diff options
context:
space:
mode:
authorGijs Boddeus <[email protected]>2017-08-15 23:43:36 +0200
committerGitHub <[email protected]>2017-08-15 23:43:36 +0200
commit06d4c6d273daf3eb84c9c5bb6306cecc9209304f (patch)
tree695d8fb5b2f414eae0bac032369f77285f594803 /docs/4.0/content/code.md
parent1fb6d8c46a560e2e35295440721ba2929f9721b6 (diff)
parent7b873fa0a15c0fb62671f95e966656967c6fd9b4 (diff)
downloadbootstrap-06d4c6d273daf3eb84c9c5bb6306cecc9209304f.tar.xz
bootstrap-06d4c6d273daf3eb84c9c5bb6306cecc9209304f.zip
Merge pull request #1 from twbs/v4-dev
updating fork of BS to v4-beta1
Diffstat (limited to 'docs/4.0/content/code.md')
-rw-r--r--docs/4.0/content/code.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/4.0/content/code.md b/docs/4.0/content/code.md
new file mode 100644
index 000000000..ddd7b9031
--- /dev/null
+++ b/docs/4.0/content/code.md
@@ -0,0 +1,50 @@
+---
+layout: docs
+title: Code
+description: Documentation and examples for displaying inline and multiline blocks of code with Bootstrap.
+group: content
+toc: true
+---
+
+## Inline code
+
+Wrap inline snippets of code with `<code>`. Be sure to escape HTML angle brackets.
+
+{% example html %}
+For example, <code>&lt;section&gt;</code> should be wrapped as inline.
+{% endexample %}
+
+## Code blocks
+
+Use `<pre>`s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering. You may optionally add the `.pre-scrollable` class, which will set a max-height of 350px and provide a y-axis scrollbar.
+
+{% example html %}
+<pre><code>&lt;p&gt;Sample text here...&lt;/p&gt;
+&lt;p&gt;And another line of sample text here...&lt;/p&gt;
+</code></pre>
+{% endexample %}
+
+## Variables
+
+For indicating variables use the `<var>` tag.
+
+{% example html %}
+<var>y</var> = <var>m</var><var>x</var> + <var>b</var>
+{% endexample %}
+
+## User input
+
+Use the `<kbd>` to indicate input that is typically entered via keyboard.
+
+{% example html %}
+To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br>
+To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd>
+{% endexample %}
+
+## Sample output
+
+For indicating sample output from a program use the `<samp>` tag.
+
+{% example html %}
+<samp>This text is meant to be treated as sample output from a computer program.</samp>
+{% endexample %}