Reset script
Different browsers have different default style. To make the user experience consistent among browsers, we have CSS reset script or normalize script. In Bootstrap 3, normalize.less
reset the CSS.
HTML accessibility
Web page today have rich UI element. But for blind people, they use screen reader to read the page. They cannot understand image and icon. Bootstrap 3 provide .sr-only
and .sr-only-focusable
to show content to screen reader without affecting the visual content. .sr-only-focusable
appears after the element focused by pressing the ‘tab’ key. Beside the Bootstrap 3 mixin, there are html attribute like aria-label
for accessibility.
LESS function
In LESS, class and mixin share the same syntax. To hide the a mixin, we can add an empty parenthesis after the mixin, like .mixin()
. This may create some code like .mixin { .mixin() }
. It looks redundant, but it is good in design, as the interface and implementation are separated.
Read More