Comments (15)
Here is the prototype of toolbar:
Supported features:
- Fixed to top with 4 elevation
- RTL
- Theme on dark and light
from material-components-web.
@yeelan0319 nice work so far! Some initial thoughts on the prototype:
- Noticed that the
<body>
styles have padding applied to it. This looks like it would only be an issue when there is a fixed toolbar. Furthermore, I'm not sure we'd want that to be padding, we may want to usemargin
instead, and altermargin-top
only. Finally, we probably don't want to do this by default. What if instead we created a css classmdc-toolbar-adjust
that could be put onto the body (or any other element) and bump it's margin top. E.g.
$mdc-toolbar-height: 64px !default;
.mdc-toolbar-adjust {
margin-top: $mdc-toolbar-height;
}
.mdc-toolbar {
height: $mdc-toolbar-height;
}
<body class="mdc-toolbar-adjust">
<div class="mdc-toolbar mdc-toolbar--fixed">
<!-- ... -->
</div>
<!-- main content -->
</body>
-
I'm not sure if the toolbar should be a
<nav>
, or have arole="toolbar"
. I think here the use of the word toolbar just refers to the stylistic treatment of the element within the material system, but it doesn't necessarily have to be used as a toolbar. @amsheehan @sgomes thoughts? -
Regarding whether or not there is a default font size for toolbar, spec doesn't say but I'd probably check with design
-
It may be useful to split the toolbar into two sections using something like flexbox, e.g. the "start" side which may contain a site title / logo, and an "end" side which may contain some icon buttons, etc. e.g. similar to Inbox. However, we also may just want to leave that up to the individual developers and just worry about styling the outer toolbar itself.
from material-components-web.
Aria toolbar:
A collection of commonly used function buttons or controls represented in compact visual form.
The toolbar container should not have the role. However, any inner actions container with icons for doing tasks should be encouraged to have the role.
+1 to flexbox, it also will handle RTL transitions seamlessly.
Do remember toolbars are not app-level only, but can be contained within inner nodes as well.
from material-components-web.
@yeelan0319 regarding having flex containers, here's a codepen example http://codepen.io/traviskaufman/pen/YNLRVN
from material-components-web.
- @traviskaufman @Garbee Valid thoughts on semantic tag and role. If toolbar is considered more as a style instead of functional component, we should remove the role and make it a div.
- Text style on toolbar is listed under Typography section in spec, which is
App bar: Title style, Medium 20sp
. I will put this intomdc-toolbar__title
. - The flex container idea is pretty interesting. So I will put
mdc-toolbar__section-start
andmdc-toolbar__section-end
as container for user to put their items in.
from material-components-web.
The use of multiple rows will also need to be thought through as well. Just remembered application-level bars can have I think up to 3 rows in different contexts. That should be integrated close to the start of the component because handling that could affect how the structure of the general toolbar will be done.
from material-components-web.
The use of multiple rows will also need to be thought through as well.
I don't think this isn't a requirement for toolbars; the spec makes no mention of it. You may be thinking of something like system bars, which are layered on top of toolbars and not something we support.
from material-components-web.
In Appbar metrics:
The app bar with significantly increased height for prominence. (Height 128dp)
EDIT: And looking around it is referenced more in the app bar section. Consistently as "Prominent" mode.
from material-components-web.
Merged to master with commit #267
from material-components-web.
Start working on implementing flexible header:
Here is a prototype of flexible header on CodePen.
Parking lot:
- Should we call the whole thing appbar or toolbar. There I saw the definition in Scrolling techniques talking about the whole thing as appbar.
- How generic the flexible header should be? Will it be applicable to things other than toolbar
from material-components-web.
from material-components-web.
Thanks @Garbee
I also confirmed with our designer that the flexible behavior is only applicable to appbar.
I will follow up with the discussion about appbar-toolbar relationship today. The tricky part is toolbar need to remove its theme (obviously should have no shadow casting).
My current thinking is
<div class="mdc-appbar">
<div class="mdc-toolbar no-theme">...</div>
<div class="mdc-flexible-space"></div>
</div>
Or another possibility I could explore is using :after
for mdc-toolbar, like:
<style>
.mdc-toolbar--with-flexible-space :after {
// flexible header definition here
}
</style>
<div class="mdc-toolbar mdc-toolbar--with-flexible-space">...</div>
from material-components-web.
Thanks @yeelan0319
After discussing with team, the plan is to go with modifier classes on mdc-toolbar, for both seams and flexible header. As @yeelan0319, design team confirmed that flexible headers / seams are coupled to toolbars, so it makes sense to bake them into it directly, rather than having to educate users on how to use another component in a certain way.
from material-components-web.
@material-components/mdc-web MDC-Web Eng Outline: Flexible Header: https://docs.google.com/document/d/1NpiWO-2A-74wYcl0FW_tZ2JU4kNBjmxhaxqJ26rFm2M/edit#heading=h.3qa3hj2cqohb
from material-components-web.
Closed via #499
from material-components-web.
Related Issues (20)
- Angular Material Tabs with sticky first tab
- The getting started guide: issues HOT 1
- [mdc-icon-button] unable to import core-styles mixin of icon-button as shown in documentation
- Unpkg: Source map for minified JS missing HOT 1
- MDCTopAppBar buttons ripple effect broken since 12.0.0 HOT 2
- Hi, I can't make a frame for the drawer, it's a problem
- Symmetric API for the Angular Material Icon Button HOT 1
- [MDCTextField] Trailing icons do not appear HOT 1
- the problem in running the program HOT 1
- [mdc-chip] css not applied to mdc-evolution-chip elements HOT 3
- Is there anyway we can force the dropdown select to always show below?
- [Chips] Filter chips not showing svg tick HOT 1
- `setAutovalidate()`/`getAutovalidate` name mismatch in readme
- Vertical mat-slider
- [mdc-theme] Contradicting advice on purpose of `$secondary`
- [Snackbar] screenreader leaves out "button" when reading message and action
- Tag for the version 14.1.0 is missing
- The release 14.1.0 isn't published on npmjs HOT 1
- Tone should work with css-variables
- [ALL] NPM packages are missing file extensions in ES6 exports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-components-web.