2.23.3 • Published 2 years ago

flystyles v2.23.3

Weekly downloads
205
License
ISC
Repository
github
Last release
2 years ago

Flystyles

Installation

The project can be installed via npm or yarn.

npm

npm install flystyles

yarn

yarn add flystyles

Build commands

A compiled version of the CSS is provided in /dist folder. To compile a new version:

Install dependencies:

npm install

Compile CSS:

npm run build

Documentation

All components in flysyles are documented in /docs folder. The styleguide is created with Jekyll.

Installation

Docs are made using Jekyll. To install Jekyll:

bundle install

To create the build files (in _site folder) execute:

bundle exec jekyll build

To launch jekyll local server:

bundle exec jekyll serve

Working

Styleguide Driven Development

Styleguide Driven Development (SDD) is a practice that encourages the separation of UX, Design & Frontend from Backend concerns. This is achieved by developing the UI separately in a styleguide.

By separating the UI and backend tasks so they don’t rely on each other, it allows teams to iterate fast on prototypes and designs without having to make changes to the backend. With careful planning they should plug-and-play together nicely.

Creating new components

To document a new component, a new markdown file has to be added to src/_docs/components. This file has a Front Matter where you have to specify the category and the name of the component:

---
title: Buttons
description: Button component description
category: components
---

Browser Sync

To help in developing workflow, a Browser Sync is provided that watch local changes and refresh the browser. That way, when we need a new component, It can be created directly in the styleguide that gets the styles from Flystyles, achieving the Styleguide Driven Development (SDD).

To run the server, execute:

npm install
npm run docs

Deploy

For the moment, the project is hosted on Netlifly flystyles.netlify.com. The project is deployed whenever you push to master automatically.

Create a new version

To create a new version you have to use the npm command version. It will generate the new dist files, add a release tag and push to the branch you are.

npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]

Then create a PR and request the review from other project commiters. Once accepted and merged to master, execute npm publish from master branch.

Architecture

src/
|
|- styles
|
|   – mixins/
|      |– _responsive.scss   # Responsive mixins
|      |– _typography.scss   # Typography mixins
|      …                     # Etc
|
|   – base/
|       |– _normalize.scss    # Reset/normalize
|       |– _typography.scss   # Typography rules
|       |- _animations.scss   # CSS Animations
|       …                     # Etc.
|
|   – utilities/
|       |– _spacing.scss      # Margins, paddings, ...
|       |– _responsive.scss   # Brakpoints visibility classes
|       …                     # Etc.
|
|- components/
|   |– Button/_Button.scss    # Buttons
|   |– Grid/_Grid.scss        # Grid
|   …                         # Etc.
|
|- _config.scss           # Flystyles variables
|– main.scss              # Main Sass file

Files follow the same naming conventions described above: they are hyphen-delimited.

BASE FOLDER

The base/ folder holds what we might call the boilerplate code for the project. In there, you might find the reset file, some typographic rules, and probably a stylesheet defining some standard styles for commonly used HTML elements (that I like to call _base.scss).

_base.scss
_reset.scss
_typography.scss
_animations.scss

COMPONENTS FOLDER

For smaller components, there is the components/ folder. There are usually a lot of files in components/ since the whole site/application should be mostly composed of tiny modules.

_media.scss
_carousel.scss
_thumbnails.scss

MIXINS FOLDER

The mixins/ folder gathers all Sass tools and helpers used across the project. Every global variable, function, mixin and placeholder should be put in here. This files dont's produce any output.

_responsive.scss
_typography.scss

THEMES FOLDER

Custom theme specific styles.

_theme.scss
_admin.scss

UTILITIES FOLDER

Utilities are low-level. They have a very narrow scope and may end up being used frequently, due to their separation from the semantics of the document and the theming of a component. As a result, once a class is in significant use great care should be taken when introducing any modifications to it.

Utilities make use of !important to ensure that their styles always apply ahead of those defined in a component's dedicated CSS.

_spacing.scss
_responsive.scss

CONFIG FILE _config.scss

The configuration file where all variables are defined. Copy this file to override the Flystyles defaults without modifying key, versioned files.

MAIN FILE flystyles.scss

The main file should be the only Sass file from the whole code base not to begin with an underscore. This file should not contain anything but @import and comments.

2.23.4

2 years ago

2.23.2

2 years ago

2.23.3

2 years ago

2.23.1-0

2 years ago

2.22.1

2 years ago

2.22.3

2 years ago

2.22.2

2 years ago

2.23.0

2 years ago

2.22.0

2 years ago

2.21.0

3 years ago

2.21.0-beta.2

3 years ago

2.21.0-beta.1

3 years ago

2.20.10

3 years ago

2.21.0-beta.0

3 years ago

2.20.10-beta-4

3 years ago

2.20.10-beta-3

3 years ago

2.20.10-beta-2

3 years ago

2.20.10-beta

3 years ago

2.20.9-rc.3

3 years ago

2.20.9-rc.4

3 years ago

2.20.9

3 years ago

2.20.9-rc.7

3 years ago

2.20.9-rc.8

3 years ago

2.20.9-rc.5

3 years ago

2.20.9-rc.6

3 years ago

2.20.9-rc.1

3 years ago

2.20.9-rc.2

3 years ago

2.20.8

3 years ago

2.20.7

3 years ago

2.20.6

3 years ago

3.0.0-0

3 years ago

3.0.1-0

3 years ago

3.0.2-0

3 years ago

2.20.5

4 years ago

2.20.4

4 years ago

2.20.4-beta

4 years ago

2.20.3

4 years ago

2.21.0-0

4 years ago

2.20.2

4 years ago

2.20.1

4 years ago

2.20.0

4 years ago

2.19.1-1

4 years ago

2.19.1-0

4 years ago

2.19.0

5 years ago

2.19.0-2

5 years ago

2.19.0-1

5 years ago

2.19.0-0

5 years ago

2.18.6

5 years ago

2.18.5

5 years ago

2.18.4

5 years ago

2.18.3

5 years ago

2.18.2

5 years ago

2.18.1

5 years ago

2.18.0

5 years ago

2.17.4

5 years ago

2.17.3

5 years ago

2.17.2

5 years ago

2.17.1

5 years ago

2.16.1

5 years ago

2.16.0

5 years ago

2.15.5

5 years ago

2.15.4

5 years ago

2.15.3

5 years ago

2.15.2

5 years ago

2.15.1

5 years ago

2.15.0

5 years ago

2.11.1

5 years ago

2.11.0

6 years ago

2.10.1

6 years ago

2.10.0

6 years ago

2.9.5

6 years ago

2.9.4

6 years ago

2.9.3

6 years ago

2.9.1

6 years ago

2.9.2

6 years ago

2.9.0

6 years ago

2.8.30

6 years ago

2.8.29

6 years ago

2.8.28

6 years ago

2.8.26

6 years ago

2.8.25

6 years ago

2.8.24

6 years ago

2.8.23

6 years ago

2.8.22

6 years ago

2.8.21

6 years ago

2.8.20

6 years ago

2.8.19

6 years ago

2.8.18

6 years ago

2.8.17

6 years ago

2.8.16

6 years ago

2.8.15

6 years ago

2.8.14

6 years ago

2.8.13

6 years ago

2.8.12

6 years ago

2.8.11

6 years ago

2.8.10

6 years ago

2.8.9

6 years ago

2.8.8

6 years ago

2.8.7

6 years ago

2.8.6

6 years ago

2.8.5

6 years ago

2.8.4

6 years ago

2.8.3

6 years ago

2.8.1

6 years ago

2.8.0

6 years ago

2.6.2

6 years ago

2.6.1

6 years ago

2.6.0

6 years ago

2.5.1

6 years ago

2.5.0

6 years ago

2.4.0

6 years ago

2.3.9

6 years ago

2.3.8

6 years ago

2.3.7

6 years ago

2.3.6

6 years ago

2.3.5

6 years ago

2.3.3

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.15

6 years ago

2.1.14

6 years ago

2.1.13

6 years ago

2.1.12

6 years ago

2.1.11

6 years ago

2.1.9

6 years ago

2.1.8

6 years ago

2.1.7

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.11

6 years ago

1.2.10

6 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.17

7 years ago

1.1.16

7 years ago

1.1.15

7 years ago

1.1.14

7 years ago

1.1.13

7 years ago

1.1.12

7 years ago

1.1.11

7 years ago

1.1.10

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago

0.0.5

8 years ago