CSSStyle

"CSSSTyle" represents a style bracket in a .css file.

Usage

Setup

const Nodebook = require('nodejs-notebook');

let styles = new Nodebook.CSSNotebook('styles');

let imageFooter = styles.create('class', 'image-footer');

Properties

imageFooter.type; // Type of style bracket (class, id, or element)
imageFooter.prefix; // Prefix used in the style bracket ("." for classes, "#' for IDs and "" for elements)
imageFooter.name; // Style Bracket name
imageFooter.file.name; // File Name
imageFooter.file.type; // File Type (css)

newStyle(style, content)

Creates a new Style inside of the bracket.

string style: The style property to add. string content: The value of the style property.

imageFooter.newStyle('opacity', '50%');
imageFooter.newStyle('height', 'auto');

Last updated