Socket
Book a DemoInstallSign in
Socket

mini.css-code-component

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini.css-code-component

A mini.css module for better code presentation.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

mini.css Code Component

A mini.css module for better code presentation.

Example

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.

Keywords

css

FAQs

Package last updated on 14 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts