mini.css-code-component
v1.0.1
Published
A mini.css module for better code presentation.
Downloads
5
Maintainers
Readme
mini.css Code Component
A mini.css module for better code presentation.
Installation
npm install mini.css-code-component
yarn add mini.css-code-component
Usage
- Create a
<pre>
element. - Wrap every line of code into a
<span class="code-line">
. - Apply highlights by wrapping text in
<span class="highlight-a">
,<span class="highlight-b">
or<span class="highlight-c">
.
Example
<pre>
<span class="code-line"><span class="highlight-a">if</span> condition:</span>
<span class="code-line"> value = <span class="highlight-c">'Result:'</span> . <span class="highlight-b">10</span></span>
<span class="code-line"> <span class="highlight-a">print</span>(value)</span>
<span class="code-line"><span class="highlight-a">return</span></span>
</pre>
Customization
You can customize the color palette and other parameters, by modifying and recompiling the Sass file.
License
This mini.css module is licensed under the MIT License.