Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex layout in demos #295

Open
konsumer opened this issue Nov 8, 2018 · 2 comments
Open

Flex layout in demos #295

konsumer opened this issue Nov 8, 2018 · 2 comments

Comments

@konsumer
Copy link

konsumer commented Nov 8, 2018

I'd be happy to make a PR for flex-layout examples instead of table-layout for all the examples, if there is interest.

I think it would simplify layout, and also be more semantically correct (these things aren't tables.)

Here is an example for AppBar, in react, with branding & a menu, mostly pulled from the example layout:

.mui-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mui-appbar > * {
  margin: 0;
  padding: 0 10px;
}

.mui-appbar a {
  color: inherit;
}
import Appbar from 'muicss/lib/react/appbar'

export default () => (
  <Appbar>
    <h1 className='mui--text-title'>Sitename</h1>
    <ul className='mui-list--inline mui--text-body2'>
      <li><a href='#'>About</a></li>
      <li><a href='#'>Pricing</a></li>
      <li><a href='#'>Login</a></li>
    </ul>
  </Appbar>
)

screen shot 2018-11-08 at 12 00 59 pm

It might even make sense to make some little flex util-classes, but it's simple enough to do it one-off like this, in my opinion.

@amorey
Copy link
Member

amorey commented Nov 8, 2018 via email

@konsumer
Copy link
Author

konsumer commented Nov 9, 2018

I can't seem to find the source for the doc-site. Where should I make the changes?

For reference, here is the pages that should be converted to non-table layout, in my opinion:

I totally agree about table-layout for HTML Emails. It's a good idea and well-supported with email-client's limited CSS support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants