extras/shared/src/main/scala/purecss/Extras.scala
author Tomas Zeman <tomas@functionals.cz>
Sat, 26 Dec 2020 21:46:29 +0100
changeset 27 f30a3e465836
child 28 fe846f058e41
permissions -rw-r--r--
Pure-scala implementation of pure-extras. https://github.com/tilomitra/cssextras
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     1
/*
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     2
 * Copyright 2020 Tomas Zeman <tomas@functionals.cz>
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     3
 *
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     4
 * Licensed under the Apache License, Version 2.0 (the "License");
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     5
 * you may not use this file except in compliance with the License.
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     6
 * You may obtain a copy of the License at
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     7
 *
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     8
 *     http://www.apache.org/licenses/LICENSE-2.0
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
     9
 *
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    10
 * Unless required by applicable law or agreed to in writing, software
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    11
 * distributed under the License is distributed on an "AS IS" BASIS,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    13
 * See the License for the specific language governing permissions and
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    14
 * limitations under the License.
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    15
 */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    16
package purecss
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    17
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    18
import scalatags.Text.all._
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    19
import scalatags.stylesheet._
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    20
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    21
import scala.collection.immutable
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    22
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    23
/*
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    24
 * https://github.com/tilomitra/cssextras/blob/master/css/pure-extras.css
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    25
 */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    26
object Extras extends CascadingStyleSheet {
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    27
  initStyleSheet()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    28
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    29
  /* Images. */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    30
  val pure_img_elliptical: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    31
    borderRadius:="80%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    32
    img(borderRadius:="50%")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    33
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    34
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    35
  val pure_img_rounded: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    36
    borderRadius:=3,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    37
    img(borderRadius:=3)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    38
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    39
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    40
  val pure_img_bordered: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    41
    backgroundColor:="#FFFFFF",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    42
    border:="1px solid rgba(0, 0, 0, 0.2)",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    43
    padding:=5
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    44
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    45
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    46
  /* Thumbnails */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    47
  val pure_thumbnails: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    48
    li(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    49
      textAlign.center,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    50
      display.`inline-block`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    51
      // *display: inline;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    52
      // *zoom: 1;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    53
      verticalAlign.top,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    54
      // -webkit-box-sizing: border-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    55
      // -moz-box-sizing: border-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    56
      boxSizing.`border-box`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    57
      padding:="0.5em"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    58
    ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    59
    listStyle:="none",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    60
    margin:=0,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    61
    padding:=0,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    62
    a.focus(outline:="0 none")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    63
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    64
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    65
  val caption_ : Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    66
  val caption_head: Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    67
  val pure_thumb: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    68
    display.block,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    69
    textDecoration.none,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    70
    color:="inherit",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    71
    caption_(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    72
      textAlign.left,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    73
      display.block,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    74
      margin:="0 5px 6px",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    75
      p(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    76
        margin:="0.3em 0 0",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    77
        fontSize:="75%"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    78
      ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    79
      caption_head(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    80
        fontWeight.bold,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    81
        marginTop:="0.3em"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    82
      )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    83
    ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    84
    img(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    85
      maxWidth:="100%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    86
      marginRight.auto,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    87
      marginLeft.auto,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    88
      verticalAlign.middle,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    89
      boxSizing.`border-box`
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    90
      // -webkit-box-sizing: border-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    91
      // -moz-box-sizing: border-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    92
    )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    93
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    94
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    95
  val pure_thumb_bordered: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    96
    border:="1px solid rgba(0, 0, 0, 0.2)"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    97
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    98
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
    99
  /* Badges/Pills */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   100
  private val badge_common = immutable.Seq[StyleSheetFrag](
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   101
    padding:="0.35em 0.9em 0.35em",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   102
    color:="#FFF",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   103
    display.`inline-block`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   104
    fontSize:="11.844",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   105
    fontWeight.bold,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   106
    lineHeight:="1.2em",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   107
    verticalAlign.baseline,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   108
    whiteSpace.nowrap,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   109
    borderRadius:=20,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   110
    margin:="0.2em"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   111
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   112
  private val bg1: StyleSheetFrag = backgroundColor:="#9D988E"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   113
  val pure_badge: Cls = cls(badge_common:+bg1:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   114
  private val bg2: StyleSheetFrag = backgroundColor:="#D13C38"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   115
  val pure_badge_error: Cls = cls(badge_common:+bg2:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   116
  private val bg3: StyleSheetFrag = backgroundColor:="#E78C05"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   117
  val pure_badge_warning: Cls = cls(badge_common:+bg3:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   118
  private val bg4: StyleSheetFrag = backgroundColor:="rgb(83, 180, 79)"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   119
  val pure_badge_success: Cls = cls(badge_common:+bg4:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   120
  private val bg5: StyleSheetFrag = backgroundColor:="rgb(18, 169, 218)"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   121
  val pure_badge_info: Cls = cls(badge_common:+bg5:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   122
  private val bg6: StyleSheetFrag = backgroundColor:="#4D370C"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   123
  val pure_badge_inverse: Cls = cls(badge_common:+bg6:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   124
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   125
  /* Alerts */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   126
  val pure_alert: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   127
    position.relative,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   128
    marginBottom:="1em",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   129
    padding:="1em",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   130
    backgroundColor:="rgb(209, 235, 238)",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   131
    borderRadius:=3,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   132
    color:="rgb(102, 131, 145)",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   133
    label(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   134
      display.`inline-block`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   135
      // *display: inline;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   136
      // *zoom: 1;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   137
      whiteSpace.nowrap
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   138
    )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   139
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   140
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   141
  val pure_alert_error: Cls = cls(backgroundColor:="#D13C38", color:="#FFF")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   142
  val pure_alert_warning: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   143
    backgroundColor:="rgb(250, 191, 103)", color:="rgb(151, 96, 13)")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   144
  val pure_alert_success: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   145
    backgroundColor:="rgb(83, 180, 79)", color:="#FFF")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   146
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   147
  /* Contextual Modals */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   148
  val bottom_ : Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   149
  val top_ : Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   150
  val right_ : Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   151
  val left_ : Cls = cls()
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   152
  private val arrow_common = immutable.Seq[StyleSheetFrag](
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   153
    borderStyle:="solid",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   154
    borderWidth:=10,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   155
    height:=0,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   156
    width:=0,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   157
    position.absolute
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   158
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   159
  val pure_arrow_border: Cls = cls(arrow_common:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   160
  val pure_arrow: Cls = cls(arrow_common:_*)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   161
  val pure_popover: Cls = cls(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   162
    position.relative,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   163
    width:=300,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   164
    backgroundColor:="#f0f1f3",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   165
    color:="#2f3034",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   166
    padding:=15,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   167
    border:="1px solid #bfc0c8",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   168
    borderRadius:=2,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   169
    boxShadow:="0 2px 8px rgba(0, 0, 0, 0.15)",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   170
    boxSizing.`border-box`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   171
    // box-padding: border-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   172
    // -webkit-background-clip: padding-box;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   173
    // -moz-background-clip: padding;
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   174
    backgroundClip.`padding-box`,
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   175
    bottom_(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   176
      pure_arrow_border(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   177
        borderColor:="#bfc0c8 transparent transparent transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   178
        bottom:="-20px",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   179
        left:="50%"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   180
      ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   181
      pure_arrow(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   182
        borderColor:="#f0f1f3 transparent transparent transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   183
        bottom:="-19px",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   184
        left:="50%"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   185
      )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   186
    ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   187
    top_(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   188
      pure_arrow_border(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   189
        borderColor:="transparent transparent #bfc0c8 transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   190
        top:="-21px",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   191
        left:="50%"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   192
      ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   193
      pure_arrow(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   194
        borderColor:="transparent transparent #f0f1f3 transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   195
        top:="-20px",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   196
        left:="50%"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   197
      )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   198
    ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   199
    right_(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   200
      pure_arrow_border(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   201
        borderColor:="transparent transparent transparent #bfc0c8",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   202
        top:="45%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   203
        right:="-21px"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   204
      ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   205
      pure_arrow(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   206
        borderColor:="transparent transparent transparent #f0f1f3",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   207
        top:="45%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   208
        right:="-20px"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   209
      )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   210
    ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   211
    left_(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   212
      pure_arrow_border(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   213
        borderColor:="transparent #bfc0c8 transparent transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   214
        top:="45%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   215
        left:="-21px"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   216
      ),
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   217
      pure_arrow(
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   218
        borderColor:="transparent #f0f1f3 transparent transparent",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   219
        top:="45%",
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   220
        left:="-20px"
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   221
      )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   222
    )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   223
  )
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   224
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   225
  /* BUTTON IMPROVEMENTS */
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   226
  val pure_button_block: Cls = cls(display.block)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   227
  val pure_button_small: Cls = cls(padding:=".6em 2em .65em", fontSize:="70%")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   228
  val pure_button_large: Cls = cls(padding:=".8em 5em .9em", fontSize:="70%")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   229
  val pure_button_selected: Cls = cls(backgroundColor:="#345fcb", color:="#fff")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   230
  val pure_button_secondary: Cls =
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   231
    cls(background:="rgb(161, 195, 238)", color:="rgb(26, 88, 122)")
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   232
  val pure_button_error: Cls = cls(background:="rgb(214, 86, 75)", color.white)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   233
  val pure_button_success: Cls =
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   234
    cls(background:="rgb(54, 197, 71)", color.white)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   235
  val pure_button_warning: Cls =
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   236
    cls(background:="rgb(255, 163, 0)", color.white)
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   237
f30a3e465836 Pure-scala implementation of pure-extras.
Tomas Zeman <tomas@functionals.cz>
parents:
diff changeset
   238
}