1.2.2 • Published 7 years ago

devsloveit-css.off-canvas v1.2.2

Weekly downloads
69
License
-
Repository
github
Last release
7 years ago

css.off-canvas by devslove.it

Installation

We recommend using a package manager to install this widget as a dependency of your project. Please read the docs of the respective package manager if you don't know how to use it.

  • npm: npm install devsloveit-css.off-canvas

You can add --save as a parameter if you want to add the plugin into your package.json.

Usage

HTML

Have a look at codepen.

data-comes-from

We are using a data-attribute (e.g. data-comes-from="right") for defining the direction.

JavaScript

We don't need JavaScript ;-)

SCSS

Mixins

@include devsloveit-off-canvas();

Creates your content container (which holds your content). You can't use $helper-background-color option here.

@include devsloveit-off-canvas-helper();

Creates your helper for removing off-canvas. You can only use $helper-background-color and transition options here.

@include devsloveit-off-canvas-wrapper();

Creates your wrapper (which holds all elements). You can only use transition options here.

@include devsloveit-off-canvas-styles();

Combines all mixins (only include once - then use single mixins).

Options
OptionDefaultDescription
$background-colorfalseDefines the background-color of your container.
$helper-background-colorfalseDefines the background-color of your closing-helper.
$max-heightfalseShould be defined for top or bottom uses.
$max-widthfalseShould be defined for left or right uses.
$transition-time$devsloveit-off-canvas-transition-timeIs defined in main settings. Can be overwritten by setting a new value to the variable.
$transition-type$devsloveit-off-canvas-transition-typeIs defined in main settings. Can be overwritten by setting a new value to the variable.

Example

@include devsloveit-off-canvas(red, $max-width: 320px);
@include devsloveit-off-canvas-helper(blue);
@include devsloveit-off-canvas-wrapper();

For additional cases

.example {
	@include devsloveit-off-canvas($max-width: 500px);
	@include devsloveit-off-canvas-helper(green);
}
1.2.2

7 years ago

1.2.1

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago