包详细信息

@moki.codes/mokui-layout

moki19BSD-3-Clause0.6.1

layout web ui subsystem

subsystem, layout, web, ui

自述文件

layout

Description

Layout block provides subsystem with the top most wrapper for a page content layout after theme or on the same level, essential child elements: header, main, footer. Other two elements are container and container-fluid. All of the elements behavior described in their appropriate section.

Installation

yarn add @moki.codes/mokui-layout

Styles

@import "@moki.codes/mokui-layout/dist/mokui-layout.css"

Basic Usage

...
<body class="layout
             layout_type_holy-grail"
>
        <header class="layout__header">
                <div class="layout__container-fluid>
                        full width content but gaps
                </div>
        </header>
        <main class="layout__main">
                <div class="layout__container">
                        responsive, centered content
                </div>
        </main>
        <footer class="layout__footer"></footer>
</body>
...

Modificators

name value description
type holy-grail establishes full holy grail layout, aside left
aside right included. layout stretched full
viewport height, dropped footer by default
type holy-grail- holy grail with main and left aside
asleft
type holy-grail- holy grail with main and right aside
asright
type holy-grail- holy grail with main only
main
header dense set header height to dense, sets
--layout-header-height to --msp-1 * 2

Variables

layout defines variables

  • --layout-min-width
    • minimal width layout shrinks default: 320px
  • --layout-min-height: auto;
    • layout minimum height
  • --layout-header-height
    • header height inside the layout defaults to --msp-1 * 3, override to change appearance
  • --layout-footer-height
    • footer height inside the layout default to auto, override to change appearance

Elements

  • header
  • aside-left
  • main
  • aside-right
  • footer
  • container
  • container-fluid

header

layout's header element, height controlled by layout's --layout-header-height

aside-left

left aside element

main

layout's main element, only purpose is to place element inside grid markup as a main content element

aside-right

right aside element

footer

layout's footer element, height controlled by layout's --layout-footer-height

container

layout's container element. Centers content in the layout, responsive, relies on the breakpoints set inside the theme(-screen-\<s,m,l,xl\>). On each breakpoint stays at the max-width of the breakpoint with 2 (--gap)'s subtracted.

container-fluid

layout's fluid container element. takes 100% of available width but (--gap) on each side

更新日志

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.6.1 (2020-02-07)

Note: Version bump only for package @moki.codes/mokui-layout

0.6.0 (2019-12-03)

Features

  • drawer: implement drawer component (a18aa64)

0.5.0 (2019-11-30)

Features

  • all: add tslib as dep, shave off build size (058cdac)

0.4.1 (2019-11-30)

Note: Version bump only for package @moki.codes/mokui-layout

0.4.0 (2019-11-11)

Features

  • layout: add header_dense modificator (4644015)

0.3.0 (2019-11-11)

Features

  • layout/holy-grail: extend holy-grail layout (9d9eb9f)

0.2.0 (2019-10-28)

Features

  • infra: build, scaffold, package structure (27f7a59)

0.1.4 (2019-09-23)

Bug Fixes

  • layout: fluid container width (bffc61d)

0.1.3 (2019-09-23)

Note: Version bump only for package @moki.codes/mokui-layout

0.1.2 (2019-08-15)

Note: Version bump only for package @moki.codes/mokui-layout

0.1.1 (2019-08-13)

Note: Version bump only for package @moki.codes/mokui-layout

0.1.0 (2019-08-13)

Features

  • layout: implements layout component (8565536)