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

[add] スクロール制御のコンポーネント追加 #97

Open
manabuyasuda opened this issue Aug 27, 2016 · 0 comments
Open

[add] スクロール制御のコンポーネント追加 #97

manabuyasuda opened this issue Aug 27, 2016 · 0 comments

Comments

@manabuyasuda
Copy link
Owner

manabuyasuda commented Aug 27, 2016

縦スクロール

  • $heightの指定は必須
  • overflow: scroll;だと高さの指定が必須になるのでscrollを指定
@mixin _c-panel($height: null) {
  position: relative;
  height: $height;
}

@mixin _c-panel__content() {
  overflow: scroll;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  -webkit-overflow-scrolling: touch;
}

横スクロール

.c-scroll {
  display: block;
  overflow-x: scroll;
  max-width: 100%;
  min-height: 0.01%;
}

.c-scroll__content {
  white-space: nowrap;
  table-layout: auto; // fixedだと背景色が途切れる
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant