UNPKG

uikit

Version:

UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.

66 lines (50 loc) 1.58 kB
// Name: Drop // Description: Component to position any element next to any other element. // // Component: `uk-drop` // // Modifiers: `uk-drop-top-*` // `uk-drop-bottom-*` // `uk-drop-left-*` // `uk-drop-right-*` // `uk-drop-stack` // `uk-drop-grid` // // States: `uk-open` // // Uses: Animation // // ======================================================================== // Variables // ======================================================================== @drop-z-index: @global-z-index + 20; @drop-margin: @global-margin; @drop-width: 300px; /* ======================================================================== Component: Drop ========================================================================== */ /* * 1. Hide by default * 2. Set position * 3. Set a default width */ .uk-drop { /* 1 */ display: none; /* 2 */ position: absolute; z-index: @drop-z-index; --uk-position-offset: @drop-margin; /* 3 */ box-sizing: border-box; width: @drop-width; } /* Show */ .uk-drop.uk-open { display: block; } /* Grid modifiers ========================================================================== */ .uk-drop-stack .uk-drop-grid > * { width: 100% !important; } // Hooks // ======================================================================== .hook-drop-misc(); .hook-drop-misc() {}