npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

csstagged

v0.2.13

Published

csstagged

Downloads

80

Readme

csstagged

Synopsis

CSSTagged visualizes a number of important signs of the overall health of the CSS of HTML based development projects. Information such as how rules are nested, how much inheritance and reuse is occurring, name duplications, and providing a way for rules to be expressed in isolation are all valuable to creating projects that are scalable and manageable long term. The latest version also includes an auto generated style guide based on the tags and relationships and variables declared in preprocessing (LESS only).

Installation

  1. add csstagged to your package.json and install
  2. after installing, view /node_modules/csstagged/ on your server to preview how it should look
  3. Move the file /node_modules/csstagged/install/csstagged.html (and styleguide.html) to the folder where your CSS is loaded from. CSSTagged will be loading assets so it needs to have the same relative paths (or change root path in Less).
  4. Change the path within this file to the location of CSSTagged
  5. Create a folder "csstagged" on your root and redirect to the csstagged.html file in your destination folder (duplicate for styleguide.html). An example is in /node_modules/csstagged/install/csstagged (OPTIONAL)
  6. (check for node_modules path excludes in .htaccess)
  7. CSSTagged needs all of your Less files combined in order and then LESS compiled. Add updates to your Gruntfile.js to include concat, less, and css_parse. Examples are in /node_modules/csstagged/install/
  8. Install the CSSTagged plugin into the Less configuration in the GruntFile.
  9. css_parse your final single css file into the same folder as csstagged.html.

Tags

CSS Tag Style

(a tag with a comment and a -ctag will ignore the comment)

-ctag-tag: "button";

// a global rule will be injected into preview every time.
-ctag-global: "true";

// "..." auto injects <div class="[classname]">[content]</div>
// { .class_name } replaces with the template referred to by the class_name
// this could be the just the name of the tag or the full selector
-ctag-example: "...Label";
// Replaces to <div class="[classname]">Label</div>

// can also nest entirely within a comment for line returns
/* -ctag-example: ...{ .row }
					{ .row }
					{ .row }
					{ .row }
*/

-ctag-example: "<span ...>Label</div>";
// Replaces to <span class="[classname]">Label</span>

-ctag-example: "...{ .myLabel }";
// Replaces to <div class="[classname]"><div class="myLabel">Label</div></div>

-ctag-example: "<span class="a">Label</div>";
// no replacement

// any selector starting with these will be ignored
-ctag-ignore: ".nano";

// a way to force url image/font roots
-ctag-url_prefix: "/client/_client/";

HTML Comment Style (Deprecated)

Example

.siteButton {
	-ctag-tag: "button";
	-ctag-example: "...Label";

	color: #000;
}

.mySection {
	-ctag-tag: "section";
	-ctag-example: "...{ .myButton }";

	width: 50%; height: 100%;

	.myButton {
		-ctag-tag: "button";
		-ctag-example: "...label";

		&:extends(
			.siteButton
		);
		color: #f00;
	}
}

Example

.siteButton {
	-ctag-tag: button;
	-ctag-example: ...Label;

	color: #000;
}

.mySection {
	-ctag-tag: section;
	-ctag-example: ...{ .myButton };
	-ctag-description: "Contains myButton";

	width: 50%; height: 100%;

	.myButton {
		-ctag-tag: button;
		-ctag-example: ...Label;
		&:extends(
			.siteButton
		);

		color: #f00;
	}
}