-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Bring back the old layout attribute names ({-sm, -md, -lg}) #693
Comments
Another quality issue related to these layout modifiers, IMO, even if they do not seem to be implemented yet (#682)
This setup would force to add all three options for non-mobile layout (>=600px), correct ? The problem I see : In a mobile-first design point of view, the special modifiers are usually needed only for non-mobile devices (as the default layout is mobile) As a consequence, developers might prefer to design desktop-first by using the shorter layout-phone for mobile layout. The previous behaviour seemed preferable in a sense that the simplest way was the correct, helping developers fall into the pit of success What about removing the upper bound of media queries ? or just bring back previous behavior, renaming them to |
@rschmukler - care to respond to @pandaiolo questions? |
@gkalpak and @pandaiolo the problem is that the queries were not logical to most people. However, your points are well received. We think we can handle the confusion around these issues by switching We can than also keep As an example To me, this takes the best of both worlds, and clears up the confusion around the existing system. Expect to see changes in the next couple of days. |
Does anyone else think the new names using device names aren't very future proof? I prefer the sm md lg because they are just ideas and they can change at any given time to represent something else. But using phone pc tablet seems like it might date it self. I mean two of those would hardly be an option a few years ago. |
@rschmukler, that would be nice [to keep unbounded MQ] ! I hope this does not mean too many additional bytes in the css |
Came along to say the same thing, glad this has already been hashed out! So... +1 to unbounded MQs, interested to see how far you go (e.g. +1 to moving away from |
I found the original names confusing at first, but really, once the secret If the classes are tied to different screen sizes in pixels, then to be Why not define both sets of names on the classes? On 20 November 2014 15:49, James Spencer notifications@github.com wrote:
Keith Garrod Tel: +27-83-3000-988 |
+1 what @epelc said. I would like to add that device dependend names imply that some kind of device detection is performed. This might be handy, but since the class names apply on viewport width the old md, lg style were "semantically correct" and, like metioned above, future proof. We might need show/hide-watch classes as well :) |
@michaelkrone There are already show/hide classes refer to the chart at the bottom of this page @kpgarrod I dont think we should use both names that will just cause more confusion, extra css, and make it seem like it wasnt thought out very well. I think we should pick one and go with it. As for adding things like As for going back to the old names. I also agree with @gkalpak that using device names is too verbose. Most apps will have layout related things all over the place going from 2 chars to 4+(except for pc) seems like a waist. If people are having problems understanding sm,md,lg we can always improve the docs. Maybe we should add some pictures to help convey this or a small demo that shows all the different sizes. |
@epelc Yes I know about the show/hide classes, thats why I proposed a show-watch class or layout-watch, which applies for viewports smaller than phone (eg. watches). Was just kidding. The point is that the new attribute names (as well as the class names) do not fit. |
Neither the old nor the new style is future-proof, because changing the The implication is that the classes represent specific numbers of pixels However, the number of pixels that a 'small' device or a 'phone' contains A solution may be for the coming online css customizer to allow each of us
|
The original issue has been resolved, so closing... |
* build: enable codelyzer and most default Angular CLI TSLint rules - do some merging of tslint:recommended and our rules * fix(a11y): fix theme picker keyboard access enable Codelyzer a11y rules Relates to angular#671 * fix(component-overview): header does not show up in headings list Fixes angular#695 * fix(stack-blitz-button): no accessible label and description is not on correct element Fixes angular#693 * fix(example-viewer): no accessible label on View source button Fixes angular#693 * fix(component-sidenav): apply aria-current to selected nav items & improve contrast - use Roboto font instead of system-ui for `docs-nav-content-btn`s - use a different background color for selected route, in addition to different text color - increase opacity of `docs-nav-content-btn`s to meet contrast guidelines - switch to `mat-nav-list` to get the benefits of better contrast and hover/focus styles - plus slightly more padding for touch interfaces Fixes angular#694. Relates to angular#671. * fix: use header and main tags for more semantic HTML - improves screen reader support - footer tags were already properly used Relates to angular#671. * fix(component-nav): apply aria-label to navs - so that they can be differentiated by screen readers Relates to angular#671. * fix(component-nav): remove aria-label that duplicates messages - aria-expanded already covers whether the section can be toggled or not - the button's text content already covers the accessible name Relates to angular#671. * fix(header-link): remove title - the aria-label is sufficient Relates to angular#671. * feat(theme-picker): provide a visual preview of the theme colors via an SVG * fix(theme-picker,version-picker): add/improve aria-labels and tooltips Fixes angular#671 * fix: various a11y refinements - minify theme-demo-icon.svg - use & instead of / as it reads better on a screen reader - prefix classes with `docs-` - tell screen reader users when a theme has been selected Fixes angular#671
Although the new layout attribute names ({-phone, -tablet etc}) read nice, they are too verbose.
(Especially the
-tablet-landscape
suffix 😃)Considering they might have to appear several times in a single element (e.g. to control layout, order, visibility, offset etc in several viewport sizes) it makes the templates way too clattered.
I wonder if there is any particular reason for replacing the old suffixes, which where equally declarative but much more compact and readable. (Maybe there is something I am missing.)
The text was updated successfully, but these errors were encountered: