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

Alert:吹き出し状に変化させられるオプションを追加 #130

Closed
qrac opened this issue Sep 13, 2018 · 8 comments
Closed

Comments

@qrac
Copy link
Owner

qrac commented Sep 13, 2018

image

フォームの入力エラーなど、パーツを指定する場合には吹き出し状に変化したほうがいい。使う頻度としては、圧倒的に top danger なので、すべてを本体に組み込むかどうかは検討する。

.alert {
  position: relative;
  &.is-tail-top,
  &.is-tail-right,
  &.is-tail-bottom,
  &.is-tail-left {
    &:before,
    &:after {
      content: "";
      position: absolute;
      display: block;
      width: 0;
      height: 0;
    }
  }
  &.is-tail-top {
    &:before {
      left: 10%;
      top: -0.5em;
      border-left: 0.5em solid transparent;
      border-right: 0.5em solid transparent;
    }
    &:after {
      left: 10%;
      top: calc(-0.5em + 1px);
      border-left: 0.5em solid transparent;
      border-right: 0.5em solid transparent;
    }
    &.is-danger {
      &:before {
        border-bottom: 0.5em solid $alert-danger-border-color;
      }
      &:after {
        border-bottom: 0.5em solid $alert-danger-background-color;
      }
    }
  }
}
@qrac
Copy link
Owner Author

qrac commented Sep 13, 2018

@qrac
Copy link
Owner Author

qrac commented Sep 13, 2018

image

すべての位置を実装する場合、上記のようなパターンが考えられる。

.alert {
  &.is-tail-top-left,
  &.is-tail-top-center,
  &.is-tail-top-right,
  &.is-tail-right-top,
  &.is-tail-right-center, // or .is-tail-right-middle
  &.is-tail-right-bottom,
  &.is-tail-bottom-left,
  &.is-tail-bottom-center,
  &.is-tail-bottom-right,
  &.is-tail-left-top,
  &.is-tail-left-center, // or .is-tail-left-middle
  &.is-tail-left-bottom {
}

@qrac
Copy link
Owner Author

qrac commented Sep 13, 2018

追加する場合、縦は middle を採用する。Flexのclassを考慮。

@qrac qrac closed this as completed Sep 13, 2018
@qrac qrac reopened this Sep 13, 2018
@qrac
Copy link
Owner Author

qrac commented Sep 13, 2018

何案件か個別のCSSで導入してみて検討。

@qrac
Copy link
Owner Author

qrac commented Mar 8, 2019

やはり、想定されるパターンが多すぎるので、プロジェクトごとに書き加える形にした方が良さそう。

@qrac qrac closed this as completed Mar 8, 2019
@qrac
Copy link
Owner Author

qrac commented Mar 28, 2019

SCSSの配列変数で増減させられそうなので、再度検討。

@qrac
Copy link
Owner Author

qrac commented Apr 2, 2019

Alertは .box に統合できるかもしれない。 プロジェクトによっては擬似要素がバッティングするので .box とは分ける。

qrac added a commit that referenced this issue Apr 8, 2019
@qrac
Copy link
Owner Author

qrac commented Apr 8, 2019

Alpha版にて反映。

@qrac qrac closed this as completed Apr 8, 2019
qrac added a commit that referenced this issue Apr 20, 2019
@qrac qrac changed the title Alert:吹き出し状に変化させられるオプション Alert:吹き出し状に変化させられるオプションを追加 Apr 21, 2019
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

1 participant