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

sass-compact

v0.0.12

Published

let's go back to original way to write our css

Downloads

10

Readme

sass-compact vscode plugin

let's go back to original way to write our css

Features

  • shortcut key shift+alt+f .

  • convert scss files and compact .wxss files

  • only format *.scss, *.wxss, *.less files.

  • support .wxss files and remove v,r,p scss mixin function flag and concat with rpx unit.

Less * Wxss Setting

  • "sassCompact.Less": "false",//default false
  • "sassCompact.Wxss": "true",//default true

Examples

  • .scss format
.pt-select {
    margin: 0 auto 3.6rem;
    span {
        margin: 0 0.7rem;
        width: 11.7rem;
        height: 16.5rem;
        div {
            width: 11.7rem;
            border: 0.3rem solid #0d25a2;
        }
    }
    span:after {
        content: "";
        top: 0;
        left: 0;
        width: 11.7rem;
        height: 16.5rem;
        s.d3 {
            margin-right: 15px;
        }
    }
    .on {
        div.d2 {
            border: 0.3rem solid #c62c34;
            form {
                input {
                    border: 1px solid #ccc;
                }
                span:hover {
                    font-size: 13rem;
                    a .pi2 {
                        margin-right: 10px;
                        font-size: 10rem;
                    }
                }
            }
        }
    }
    .on:after {
        content: "";
        top: 0;
        left: 0;
        width: 11.7rem;
        height: 16.5rem;
    }
}
  • output
.pt-select { margin: 0 auto 3.6rem;
    span { margin: 0 0.7rem; width: 11.7rem; height: 16.5rem;
        div { width: 11.7rem; border: 0.3rem solid #0d25a2; }
    }
    span:after { content: ""; top: 0; left: 0; width: 11.7rem; height: 16.5rem;
        s.d3 { margin-right: 15px; }
    }
    .on {
        div.d2 { border: 0.3rem solid #c62c34;
            form {
                input { border: 1px solid #ccc; }
                span:hover { font-size: 13rem;
                    a .pi2 { margin-right: 10px; font-size: 10rem; }
                }
            }
        }
    }
    .on:after { content: ""; top: 0; left: 0; width: 11.7rem; height: 16.5rem; }
}
  • .wxss format
.page-award { width: v(-750);
    .empty { font-size: v(-28);
        img { margin-top: v(-222); width: v(303); margin-bottom: v(10); }
    }
    .award-list { margin: 0 v(96); height: v(850); }
	.award-item {  box-shadow:0 v(3) 0 0 rgba(13,17,90,1); box-shadow:0 v(3) 0 0 rgba(13,17,90,1); }
    .award-item_status { right: v(28); }
    .award-item_top {
	   img{max-width: v(100)}
    }
	.award-item_btn { box-shadow:0 v(2) v(2) rgba(223, 198, 153, 1);
    &.used{background:#eee; }
	}
}
  • output
.page-award { width: -750rpx; }
.page-award .empty { font-size: -28rpx; }
.page-award .empty img { margin-top: -222rpx; width: 303rpx; margin-bottom: 10rpx; }
.page-award .award-list { margin: 0 96rpx; height: 850rpx; }
.page-award .award-item { box-shadow:0 3rpx 0 0 rgba(13,17,90,1); box-shadow:0 3rpx 0 0 rgba(13,17,90,1); }
.page-award .award-item_status { right: 28rpx; }
.page-award .award-item_top img{max-width: 100rpx}
.page-award .award-item_btn { box-shadow:0 2rpx 2rpx rgba(223, 198, 153, 1)}
.page-award .award-item_btn.used{background:#eee; }

Release Notes

0.0.1

Initial release of cssCompact


Note:

  • 1、if you can not format your .scss/.less files, maybe you can exchange LF with CRLF.
  • 2、if something weired, use ctrl+K ctrl+D to standard formatting your .scss files first.
  • 3、leave a blank before '}' to make your emmet effective and format your code.
  • 4、max nest level is 8, do not over this limit.
  • 5、if you have mixin funtions of v(100)、r(30)、p(5) in your .wxss files, it will convert to 100rpx、30rpx、5rpx. you can also disable this feature from settings.json with "sassCompact.Wxss": "false".

Enjoy!