https://khang-nd.github.io/7.css/ X logo Share Facebook logo Share LinkedIn logo Share GitHub logo Fork * Intro * Installation + Scoping + Tree-shaking * Components + Balloon + Button + CheckBox + Collapse + ComboBox + Dropdown + GroupBox + ListBox + ListView (table) + Navigation o Menu o MenuBar + OptionButton + ProgressBar + Scrollbar + SearchBox + Slider + Spinner + Tabs + TextBox + TreeView + Window o Title Bar o Window body o Status Bar o Glass frame & Color o Dialog Box * Issues, Contributing, etc. 7.css --------------------------------------------------------------------- A design system for building faithful recreations of old UIs. npm npm bundle size Intro 7.css is a CSS framework for building interface components that look like Windows 7. It is built on top of the GUI backbone of XP.css, which is an extension of 98.css. My First Program Hello, world! OK Cancel This framework relies on the usage of semantic HTML. To make a button, you'll need to use a Copy Code Also note that using the scoped stylesheet will eliminate the scrollbar styling as well. Tree-shaking In case you only need the styling of certain components rather than the complete stylesheet as a whole, you may import them separately as below: unpkg: https://unpkg.com/7.css/dist/gui/buttons.css https://unpkg.com/7.css/dist/gui/tabs.css or npm: import "7.css/dist/gui/buttons.css" import "7.css/dist/gui/tabs.css" For more components, see the published gui folder. Components Balloon A balloon is a small pop-up window that informs users of a non-critical problem or special condition in a control. -- Microsoft Windows User Experience - Balloons A balloon or tooltip can be created using the role="tooltip" attribute. A balloon is better known as tooltip in web development. Show code
A balloon is better known as tooltip in web development.
Copy Code A control may bind to a balloon with the aria-describedby attribute. You will need to set up an event for the control to trigger the balloon. [ ] Press Backspace to dismiss Show code Copy Code To change the position of the balloon, which subsequently change the placement of its tail, combine the respective vertical and horizontal classes: * Vertical: .is-top / .is-bottom * Horizontal: .is-left / .is-right This balloon is positioned bottom right of the source control (default behavior). This balloon is positioned bottom left of the source control. This balloon is positioned top left of the source control. This balloon is positioned top right of the source control. Show code
This balloon is positioned bottom right of the source control (default behavior).
Copy Code Button A command button, also referred to as a push button, is a control that causes the application to perform some action when the user clicks it. -- Microsoft Windows User Experience p. 160 A standard button measures 75px wide and 23px tall with 12px of horizontal padding by default. They are styled with 2 shades of gray as a vertical gradient. Click me Show code Copy Code When buttons are clicked, the gray gradient is shifted to corresponding sky blues. The following button is simulated to be in the pressed (active) state. I am being pressed Show code Copy Code Disabled buttons have solid background and lighter border. I cannot be clicked Show code Copy Code Button focus is communicated with a dotted border, set 4px within the contents of the button. The following example is simulated to be focused. I am focused Show code Copy Code A default button (in Windows, hitting the Enter key in a dialog context triggers the button) has a greenish-blue border and a light blue gradient shade. I am the one! Show code Copy Code The button styles are also applied to the file input element. Due to the complex setup, the styles of the standard button's states (hover, active, focus etc.) cannot be applied to the file input button. [ ] Show code Copy Code You can use the below workaround to apply the complete button styles to a file input element. In this setup, the file input is hidden and a label with the role="button" attribute is used to trigger the file selection dialog. The tabindex="0" attribute ensures the button is keyboard accessible. Some JavaScript is required if you want the label to trigger when it is focused and activated with the keyboard. [ ] Choose file [ ] Browse... Show code Copy Code CheckBox A check box represents an independent or non-exclusive choice. -- Microsoft Windows User Experience p. 167 Checkboxes are represented with a sunken panel, populated with a "check" icon when selected, next to a label indicating the choice. Note: You must include a corresponding label after your checkbox, using the