Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
2.0 kB
1
Indexable
Never
<div class="app">  
  <div class="mdc-top-app-bar">
    <div class="mdc-top-app-bar__row">
      <div class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start">
        <span class="mdc-top-app-bar__navigation-icon material-icons">menu</span>
        <span class="mdc-top-app-bar__title">Toolbar</span>
        <nav class="mk-toolbar-nav">
          <ul class="mk-toolbar-nav__tabs">
            <li>
              <a class="mk-toolbar-nav__tab mk-toolbar-nav__tab--active" href="#">Overview</a>
            </li>
            <li>
              <a class="mk-toolbar-nav__tab" href="#">Features</a>
            </li>
            <li>
              <a class="mk-toolbar-nav__tab" href="#">About</a>
            </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
</div>

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

.app {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  height: 100vh;
  background-color: #f1f4f7;
  overflow-y: auto;
}

.mdc-toolbar {
  max-width: 600px;
  margin: 0 auto;
}

.mk-toolbar-nav {
  display: flex;
  align-items: center;
  height: 56px;
  margin-left: 1rem;

  @media (min-width: 600px) {
    height: 64px;
    margin-left: 1.5rem;
  }

  &__tabs {
    display: flex;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0;

    // stylelint-disable
    > li {
      display: inline-block;
    }
  }

  &__tab {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 0 24px;
    color: rgba(255, 255, 255, .87);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .04em;
    text-decoration: none;
    transition: color .2s ease-out;

    &:hover {
      color: #fff;
    }

    &--active {
      color: #fff;
      font-weight: 500;
      box-shadow: 0 -2px inset;
    }
  }
}

.mdc-toolbar__title + .mk-toolbar-nav {
  margin-left: 20px;
}

Leave a Comment