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

macro-css

v1.0.5

Published

Micro CSS classes for a convenient description of styles

Downloads

497

Readme

Минимальный набор готовых CSS-классов для повседневных задач по верстке.

Установка

NPM: npm install macro-css

Yarn: yarn add macro-css

Использование

Установить набор классов с помощью NPM или Yarn

React

Подключить в любом месте index.js: import 'macro-css';

SASS/SCSS

Открыть самый главный файл со стилями и дописать в самом начале: @import 'macro-css';

Внизу в таблице приведены примеры классов, которые можно использовать. Вместо символа "*" укажите одну букву любой стороны. Если не указывать сторону, то отступы будут задаваться со всех сторон.

Сторона => сокращение:

  • left => l
  • right => r
  • top => t
  • bottom => b

Например:

| Класс | Значение | | ------------------- | ------------------------------------------------------------- | | mr-10 mb-50 | margin-right: 10px; margin-bottom: 50px; | | m-25 | margin: 25px; | | p-50 | padding: 50px; | | pr-10 mt-15 mb-15 | padding-right: 10px; margin-top: 15px; margin-bottom: 15px; |

Значение:

  • mt-10 - margin-top: 10px
  • mr-40 - margin-right: 40px

Отступы margin

| Класс | Значение | | ------ | ---------------- | | m*-5 | margin-*: 5px; | | m*-10 | margin-*: 10px; | | m*-15 | margin-*: 15px; | | m*-20 | margin-*: 20px; | | m*-25 | margin-*: 25px; | | m*-30 | margin-*: 30px; | | m*-35 | margin-*: 35px; | | m*-40 | margin-*: 40px; | | m*-45 | margin-*: 45px; | | m*-50 | margin-*: 50px; |

Отступы padding

| Класс | Значение | | ------ | ----------------- | | p*-5 | padding-*: 5px; | | p*-10 | padding-*: 10px; | | p*-15 | padding-*: 15px; | | p*-20 | padding-*: 20px; | | p*-25 | padding-*: 25px; | | p*-30 | padding-*: 30px; | | p*-35 | padding-*: 35px; | | p*-40 | padding-*: 40px; | | p*-45 | padding-*: 45px; | | p*-50 | padding-*: 50px; |

Очистка базовых стилей

| Класс | Значение | | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | clear | Очищает базовые стили, которые устанавливает браузер для: <a>, <ul>, <li>. Также для всех (*) остальных элементов: box-sizing: border-box; outline: none |

Flex, позиционирование, размер

| Класс | Значение | | --------------- | ------------------------------- | | h100p | height: 100%; | | w100p | width: 100%; | | d-ib | display: inline-block; | | d-if | display: inline-flex; | | d-flex | display: flex; | | d-block | display: block; | | justify-between | justify-content: space-between; | | justify-around | justify-content: space-around; | | justify-center | justify-content: center; | | align-center | align-items: center; | | align-end | align-items: flex-end; | | align-start | align-items: flex-start; | | flex-column | flex-direction: column; | | flex-row | flex-direction: row; | | flex-wrap | flex-wrap: wrap; | | flex-auto | flex: 1 1 auto; | | flex | flex: 1; | | m-auto | margin: auto; | | ml-auto | margin-left: auto; | | mr-auto | margin-right: auto; | | text-center | text-align: center; | | pos-r | position: relative; | | pos-a | position: absolute; |

Текст

| Класс | Значение | | --------------- | --------------------------------------------------------------- | | text-center | text-align: center; | | text-capitalize | text-transform: capitalize; | | text-uppercase | text-transform: uppercase; | | text-lowercase | text-transform: lowercase; | | text-truncate | white-space: nowrap; overflow: hidden; text-overflow: ellipsis; | | fw-bold | font-weight: bold; |

Opacity

| Класс | Значение | | ---------- | ------------- | | opacity-1 | opacity: 0.1; | | opacity-2 | opacity: 0.2; | | opacity-3 | opacity: 0.3; | | opacity-4 | opacity: 0.4; | | opacity-5 | opacity: 0.5; | | opacity-6 | opacity: 0.6; | | opacity-7 | opacity: 0.7; | | opacity-8 | opacity: 0.8; | | opacity-9 | opacity: 0.9; | | opacity-10 | opacity: 1; |