diff --git a/docs/customization.html b/docs/customization.html index 6d166c3..3e4112d 100644 --- a/docs/customization.html +++ b/docs/customization.html @@ -32,7 +32,7 @@
-
+

Customization

mini.css is built in such a way that customizing it is really simple. You can try out one of the pre-defined flavors, if you want to start learning and build something quickly. We strongly suggest, however, that you customize an existing flavor or build your own, by tweaking variables and using mixins, in order to create your own, unique style. In this page, we will try to give you some guidelines and tips on how to do so and explain a few more things about the inner workings of mini.css.


Introduction & basics

@@ -46,27 +46,27 @@
-
+

Modules & file structure

At the heart of mini.css are modules - groups of classes and styles that aim to solve one set of needs. There are 10 modules in mini.css, which have been already written for you. All of the modules are built using partial files, named _module_name.scss and placed in the src/mini folder. You can edit any of the modules' code and/or add your own modules, following the same structure. The only thing you need to remember to do, in order to add your module to your flavor, is to add an @import statement after all the required variable declarations towards the bottom of your flavor file and it will be compiled along with the rest of mini.css. Similarly, to disable a module, just comment out its @import statement from the flavor file.

-
+

Variables

Everything in mini.css is based on Sass variables. We try to make our variable names as descriptive as possible, usually using names like $block-element-property-name, but some things might vary a little bit. Changing the values of variables should be reasonably easy, simply navigate to the src/flavors/flavor-name.scss file for a pre-defined flavor and you will see a list of variables that you can tweak. Change the values as you see fit and your finalized stylesheet will reflect the changes you have made. We did our best to make everything as customizable as possible, so that different people can build entirely different flavors using the same building blocks.

-
+

Code optimization

Building mini.css was no small task. Making it lightweight and customizable made things even harder, because these two things don't go well together most of the time. What we did was put more of the load on the preprocessor, instead of the final file. In order to accomplish this, we optimized as much of the code as possible, using conditions, flags and other tricks, so that compiling a flavor file might take one second longer, but loading won't. If you add any code to a flavor yourself, remember not only to make it customizable, but also to optimize it as best as possible.

-
+

Mixins

A lot of elements and components can be styled in many ways and most of the time we want a few styles to be available, without having to rewrite everything. We utilized the @mixin directive of Sass wherever we could to make it possible for you to easily create styles for pre-existing components and elements without having to tweak the base code for said elements or components. To use a mixin, simply @include it, passing values to at least its mandatory parameters. We recommend you write mixins wherever possible, if you create any new modules for mini.css.

-
+

Building a flavor

Creating your own flavor can be as easy or as complicated as your needs. Adding and removing modules is as simple as adding an @import statement or commenting it out, after declaring all the required variables. In this section, we will briefly walk you through most of the variables usually present in a flavor, along with some flags and mixins. This section serves as a complementary documentation to the comment column present in our pre-defined flavors, instead of a replacement and should be always viewed alongside it.


@@ -88,19 +88,19 @@

Grid

-

The grid module contains two important variables, the boolean $use-four-step-grid which determines if the grid has 3 or 4 breakpoints and the $grid-column-count which determines the amount of vertical columns used for the grid's layout. Apart from those, there are a few variables that set the names for the grid system's classes, prefixes and suffixes and the grid's screen size breakpoint definitions.

+

The grid module contains three important variables, the booleans $use-four-step-grid which determines if the grid has 3 or 4 breakpoints and $include-parent-layout which determines if predefined layouts should be included and the integer $grid-column-count which determines the amount of vertical columns used for the grid's layout. Apart from those, there are a few variables that set the names for the grid system's classes, prefixes and suffixes and the grid's screen size breakpoint definitions.

Navigation

-

The navigation module contains a plethora of variables used in the styling of the navigational elements. Most of them concern colors, spacing and sizing or similar things. Bear in mind that the presentation of buttons inside the <header> element will be affected by the styling of all button elements, as defined in the input_control module. The variable that stands out in this module is $nav-sublink-depth which determines how deep a navigational hierarchy tree can be.

+

The navigation module contains a plethora of variables used in the styling of the navigational elements. Most of them concern colors, spacing and sizing or similar things. Bear in mind that the presentation of buttons inside the <header> element will be affected by the styling of all button elements, as defined in the input_control module. The variables that stand out in this module are $nav-sublink-depth which determines how deep a navigational hierarchy tree can be, along with the $include-header-sticky and $include-footer-sticky booleans that determine if sticky elements should be included for headers and footers respectively.

Input Control

-

The input_control module is one of the larger modules, containg a lot of variables to style a multitude of elements. Forms and textual <input> elements utilize variables that concern color, spacing, sizing etc. Button variables are more interesting, especially the ones concerning the opacity of button elements ($button-back-opacity and $button-hover-back-opacity). The $hide-file-inputs boolean variable determines how <input type="file"> elements will be handled. Checkboxes and radio buttons also use a few variables concerning basic styling, but special attention needs to be paid to the $checkbox-size variable, as it determines a few attributes of both elements.

+

The input_control module is one of the larger modules, containg a lot of variables to style a multitude of elements. Forms and textual <input> elements utilize variables that concern color, spacing, sizing etc. One important variable concerning forms is the boolean $include-fluid-input-group, whose value determines if fluid input groups will be available. Button variables are more interesting, especially the ones concerning the opacity of button elements ($button-back-opacity and $button-hover-back-opacity). The $hide-file-inputs boolean variable determines how <input type="file"> elements will be handled. Checkboxes and radio buttons also use a few variables concerning basic styling, but special attention needs to be paid to the $checkbox-size variable, as it determines a few attributes of both elements.

There are two mixins in the input_control module, specifically:

  • make-button-alt-color - button color variants
  • @@ -111,7 +111,7 @@

    Table

    -

    The table module's variables deal mostly with basic table styling. The $table-mobile-breakpoint is very important as it determines the breakpoint for responsive tables' mobile view, along with $table-mobile-card-label which determines the attribute that will be used to display the table headings on mobile devices.

    +

    The table module's variables deal mostly with basic table styling. The $table-mobile-breakpoint is very important as it determines the breakpoint for responsive tables' mobile view, along with $table-mobile-card-label which determines the attribute that will be used to display the table headings on mobile devices. Finally, $include-horizontal-table determines if horizontal tables will be included.

    @@ -135,12 +135,14 @@

    Contextual

    -

    The contextual module features, apart from basic naming and styling variables, a few things of note. The boolean variable $alert-include-animated determines if animated alerts will be inluded or not. There is also a handful of mixins, which are the most important part of the contextual module as they are what makes it useful:

    +

    The contextual module features, apart from basic naming and styling variables, a few things of note. The boolean variable $alert-include-animated determines if animated alerts will be inluded or not. Likewise, the boolean variable $include-tooltip determines if tooltips shoud be included. There is also a handful of mixins, which are the most important part of the contextual module as they are what makes it useful:

    • make-mark-alt-color - mark color variants
    • make-mark-alt-style - mark size and spacing variants
    • make-alert-alt-color - alert color variants
    • make-alert-alt-style - alert size and spacing variants
    • +
    • make-tooltip-alt-color - tooltip color variants
    • +
    • make-tooltip-alt-style - tooltip size and spacing variants
    @@ -160,25 +162,24 @@

    Utility

    -

    The utility module contains a few variables dealing with naming and basic styling, but its most important feature is its mixins:

    +

    The utility module contains a few variables dealing with naming and basic styling, while some boolean variables like $include-floats, $include-clearfix and $include-center-block can be toggled on or off to enable or disable legacy features. The most important feature of this module, however, are its mixins:

    • make-border-generic - generic border
    • make-border-radial-style - border radius variants
    • make-box-shadow-generic - generic shadow variants
    • make-margin-responsive - responsive margins
    • make-padding-responsive - responsive paddings
    • -
    • make-floats - quick floats
-
+

If you would rather use one of the pre-defined flavors, check out our flavors page for a list of all flavors currently available.

-
+
diff --git a/docs/v2/DEVLOG.md b/docs/v2/DEVLOG.md index 415f165..e43f1a4 100644 --- a/docs/v2/DEVLOG.md +++ b/docs/v2/DEVLOG.md @@ -862,3 +862,6 @@ - Added `sticky` documentation in `navigation`. No *dos* and *dont's* either, I'm afraid, can't find any troublesome things with this. - Added a quick fix for `table`s' irregular styling of mutliline headers. Resolves #54. - Updated `input_control` documentation for accessibility and `fluid` `input-group`s. Finally resolved #40, accessibility is now properly explained everywhere. +- Removed `demo.html` once again. +- Updated `v2/index.html` to take up less space. +- Updated `customization.html` page with latest information. diff --git a/docs/v2/demo.html b/docs/v2/demo.html deleted file mode 100644 index 4a7cb8a..0000000 --- a/docs/v2/demo.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - mini.css - v2.1.0 Test page - - - - - - - - - - - - - - -
-
-
-
- -

mini.css

- v2.0 -
-
-
-
-
-
- Introduction - Modules - Flavors - Customization - Quick Reference - Github -
-
- -
-
-

Quick-layout system

-
-
-
-
-
-
-
-
-
-
-

Classic system

-
-
-
-
-
-
-
-
-
-
-
- Test span button -
- - Button - -
-
-
-
-
- -
-
- Show a tooltip while hovering


- -
-
- Simple form -
- - - - -
-
- - -
-
- - -
-
- - -
-
-
- - -
-
-
-
- -
-
-

Heading

-

Some text...

-
-
- - -
- - - - - - - diff --git a/docs/v2/index.html b/docs/v2/index.html index e480056..68ace12 100644 --- a/docs/v2/index.html +++ b/docs/v2/index.html @@ -1,18 +1,11 @@ - - - - mini.css - Minimal, responsive, style-agnostic CSS toolkit - - - - - - - - - - - - - - \ No newline at end of file + +mini.css - Minimal, responsive, style-agnostic CSS framework + + + + + + + + +