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

scss-flexbox-grid-system

v1.0.2

Published

SCSS Flexbox Grid system for web applications

Downloads

9

Readme

Сетка

Сетка Flexbox Grid. За основу взята сетка flexboxgrid.com. Сетка была расширена необходимыми классами и немного адаптирована под мои нужды.

Для работы адаптива сетки, необходимо установить пакет с медиа запросами - scss-media-queries-system

Навигация по документации сетки.

Установка

  npm i scss-media-queries-system -D

Подключение Nuxt.js

Для начала необходимо установить модуль Nuxt Style Resources для работы с SCSS. Затем в файле nuxt.config.js подключить SCSS файл со стилями сетки:

  styleResources: {
    scss: [
      '@/node_modules/scss-flexbox-grid-system/flexbox-grid.scss',
    ],
  },

Документация Flexbox Grid

Сетка имеет 12-ти колоночную систему. Основные классы сетки:

.flex-grid

flex-grid - Базовый контейнер для колонок сетки.

.col-#

col-# - Колонки сетки. Должны быть вложены в flex-grid.

Адаптивные стили колонок

| Selector | | ------------ | | col-xs-# | | col-sm-# | | col-xm-# | | col-md-# | | col-lg-# | | col-xl-# | | col-# |

.col-offset-#

col-offset-# - Селекторы для смещения колонок внутри сетки.

| Selector | | ----------------- | | col-xs-offset-# | | col-sm-offset-# | | col-xm-offset-# | | col-md-offset-# | | col-lg-offset-# | | col-xl-offset-# | | col-offset-# |

Вспомогательные классы

Список доступных вспомогательных классов для работы с разметкой.

.d-flex

d-flex - Селектор для display: flex;.

| Selector | | ----------- | | d-flex-xs | | d-flex-sm | | d-flex-xm | | d-flex-md | | d-flex-lg | | d-flex-xl | | d-flex |

.d-flex-inline

d-flex-inline - Селектор для display: flex-inline;.

| Selector | | ------------------ | | d-flex-inline-xs | | d-flex-inline-sm | | d-flex-inline-xm | | d-flex-inline-md | | d-flex-inline-lg | | d-flex-inline-xl | | d-flex-inline |

.start

start - Селектор для justify-content: flex-start;.

| Selector | | ---------- | | start-xs | | start-sm | | start-xm | | start-md | | start-lg | | start-xl | | start |

.center

center - Селектор для justify-content: center;.

| Selector | | ----------- | | center-xs | | center-sm | | center-xm | | center-md | | center-lg | | center-xl | | center |

.end

end - Селектор для justify-content: flex-end;.

| Selector | | -------- | | end-xs | | end-sm | | end-xm | | end-md | | end-lg | | end-xl | | end |

.top

top - Селектор для align-items: flex-start;.

| Selector | | -------- | | top-xs | | top-sm | | top-xm | | top-md | | top-lg | | top-xl | | top |

.middle

middle - Селектор для align-items: center;.

| Selector | | ----------- | | middle-xs | | middle-sm | | middle-xm | | middle-md | | middle-lg | | middle-xl | | middle |

.bottom

bottom - Селектор для align-items: flex-end;.

| Selector | | ----------- | | bottom-xs | | bottom-sm | | bottom-xm | | bottom-md | | bottom-lg | | bottom-xl | | bottom |

.around

around - Селектор для align-items: space-around;.

| Selector | | ----------- | | around-xs | | around-sm | | around-xm | | around-md | | around-lg | | around-xl | | around |

.between

between - Селектор для justify-content: space-between;.

| Selector | | ------------ | | between-xs | | between-sm | | between-xm | | between-md | | between-lg | | between-xl | | between |

.fd-row

fd-row - Селектор для flex-direction: row;.

| Selector | | ----------- | | fd-row-xs | | fd-row-sm | | fd-row-xm | | fd-row-md | | fd-row-lg | | fd-row-xl | | fd-row |

.fd-row-reverse

fd-row-reverse - Селектор для flex-direction: row-reverse;.

| Selector | | ----------- | | fd-row-reverse-xs | | fd-row-reverse-sm | | fd-row-reverse-xm | | fd-row-reverse-md | | fd-row-reverse-lg | | fd-row-reverse-xl | | fd-row-reverse |

.fd-column

fd-column - Селектор для flex-direction: column;.

| Selector | | ----------- | | fd-column-xs | | fd-column-sm | | fd-column-xm | | fd-column-md | | fd-column-lg | | fd-column-xl | | fd-column |

.fd-column-reverse

fd-column-reverse - Селектор для flex-direction: column-reverse;.

| Selector | | ---------------------- | | fd-column-reverse-xs | | fd-column-reverse-sm | | fd-column-reverse-xm | | fd-column-reverse-md | | fd-column-reverse-lg | | fd-column-reverse-xl | | fd-column-reverse |

Упорядочивание колонок

Список доступных классов для упорядочивания колонок сетки.

.first

first - Селектор для order: -1;.

| Selector | | ---------- | | first-xs | | first-sm | | first-xm | | first-md | | first-lg | | first-xl | | first |

.last

last - Селектор для order: 1;.

| Selector | | --------- | | last-xs | | last-sm | | last-xm | | last-md | | last-lg | | last-xl | | last |

Контейнеры

Контейнер для центрирования контента.

На любом размере экрана мы вычитаем из 50vw (используем vw чтобы ширина считалась не от родителя, а от ширины области промотора браузера.) сумму половины текущей ширины и корректирующего значения в 590px, что позволяет держать контент фиксированно в 1180px, когда экран больше или равен этому значению. Для простоты восприятия, все описанное выше помещается в следующую формулу:

(100% - 1180px)/2 = 50% - 590px

Где (100% - 1180px) — это сумма боковых полей вне контейнера.

| Разрешение | Ширина контейнера | | ----------- | ----------------- | | xs | 540px | | sm | 540px | | xm | 720px | | md | 720px | | lg | 960px | | xl | 1180px |

.container

container - Контейнер с фиксированной шириной.

.container-fluid

container-fluid - Контейнер растягивает контент по всей ширине экрана.

Отступы

Вспомогательные сокращенные классы отступов для изменения внешнего вида элементов. Классы именуются в формате {свойство}{сторона}-{размер}.

Где свойство одно из:

  • m - Для установки margin.
  • p - Для установки padding.

Где сторона одна из:

  • t - Для установки margin-top or padding-top.
  • b - Для установки margin-bottom or padding-bottom.

Где размер один из:

  • 0 - 0.
  • 1 - 1rem.
  • 2 - 2rem.
  • 3 - 3rem.
  • 4 - 4rem.
  • 5 - 5rem.
  • auto - Для установки свойства margin в значение auto.