codefabrik-styleguide 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26bf608849bfd722a0c3fae256b5338da0863ea20e36fb99df640653a7a5c5a9
4
- data.tar.gz: aea5c73a0fc766affbd06c3fc657a253050a01284a2decfd7bb6389b81e2f862
3
+ metadata.gz: 1178226e21c9b96d7b5f5b8c6e46df5dd35cb1e75571e327d41f3007ab7113ed
4
+ data.tar.gz: 4e6dce3099ca588a06e49fa6551c6a3762f28473f7ac51829d6711411a26c8d7
5
5
  SHA512:
6
- metadata.gz: 0e2fd0e3c0a35914252e2c477103e827cc41c22014703769d6d8b866b3b3dffbfbd895bbb1c689608b33b0bd31b9cbf50307f54a5d5303e4f1eedd3442a8aba3
7
- data.tar.gz: 319470299a08db00b427fb91b2ed34a84dcf0c9f27ee5cf1fbf39c76863c086e0aa500b271df98b2b3f773b0ad3da83eb190189aca5d86865949ec863b1bd349
6
+ metadata.gz: 9a90dec28e48982f3bd07876d6f820cd3414492a3a6fb41de350a0e8c775feda7abef334cdb27a952d666725c56ba383c61588502bcb1328c249b4fb4c6d2d9b
7
+ data.tar.gz: 27060a16ed6e81b7b4a1c5abceb407c8a6f7470a4aab48ab1bcd0441aa5a6ec21b1ef5d56a4ad4c6f523462810608b1b02ae664d825af32cb20f19ac4eb84063
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codefabrik-styleguide (0.1.0)
4
+ codefabrik-styleguide (0.1.2)
5
5
  dartsass-rails (>= 0.4.0)
6
6
  rails (>= 6.0)
7
7
 
data/README.md CHANGED
@@ -37,6 +37,8 @@ $secondary_color: pink;
37
37
  $text_on_secondary_color: black;
38
38
  $border_color: green;
39
39
  $default_distance: 1rem;
40
+ $background_color: white;
41
+ $font: 'sans-serif';
40
42
  ```
41
43
 
42
44
  ## Architecture
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Codefabrik
4
4
  module Styleguide
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
@@ -1,6 +1,44 @@
1
+ header {
2
+ width: 100%;
3
+ background-color: $primary_color_light;
4
+ color: $text_on_primary_color;
5
+ padding: $default_distance;
6
+
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: center;
10
+
11
+ .logo {
12
+ height: 3rem;
13
+ }
14
+
15
+ section {
16
+ display: flex;
17
+ text-align: center;
18
+
19
+ &:nth-child(n+2) {
20
+ margin-top: $default_distance;
21
+ }
22
+
23
+ a {
24
+ margin-left: $default_distance;
25
+ margin-right: $default_distance;
26
+ color: $text_on_primary_color;
27
+ text-decoration: none;
28
+ }
29
+
30
+ @each $count in 1 2 3 4 5 6 7 8 9 10 {
31
+ .order-#{$count} {
32
+ order: $count;
33
+ }
34
+ }
35
+ }
36
+ }
37
+
1
38
  .wrapper {
2
39
  width: calc(100% - 2 * $default_distance);
3
40
  margin: 0 $default_distance;
41
+ margin-top: $default_distance;
4
42
 
5
43
  @media screen and (min-width: $media_breakpoint) {
6
44
  width: $media_breakpoint;
@@ -8,6 +46,38 @@
8
46
  }
9
47
  }
10
48
 
49
+ // Side by side layout
50
+ @media screen and (min-width: $media_breakpoint) {
51
+ body {
52
+ display: flex;
53
+
54
+ .sidebar {
55
+ width: unset;
56
+ height: 100vh;
57
+ position: sticky;
58
+ top: 0;
59
+ padding: 0;
60
+ padding-top: $default_distance;
61
+ background-color: transparent;
62
+
63
+ section {
64
+ display: flex;
65
+ flex-direction: column;
66
+ margin-bottom: $default_distance;
67
+
68
+ a {
69
+ margin: 0;
70
+ }
71
+ }
72
+ }
73
+
74
+ .wrapper {
75
+ flex: 1;
76
+ margin: 2vh;
77
+ }
78
+ }
79
+ }
80
+
11
81
  $sizes: ("quarter": 0.25, "half": 0.5, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6);
12
82
 
13
83
  @each $name, $size in $sizes {
@@ -4,6 +4,16 @@
4
4
  row-gap: $default_distance;
5
5
  grid-template-columns: 1fr;
6
6
 
7
+ .center-center {
8
+ justify-self: center;
9
+ align-self: center;
10
+ }
11
+
12
+ .center-right {
13
+ justify-self: flex-end;
14
+ align-self: center;
15
+ }
16
+
7
17
  &.nogap {
8
18
  column-gap: 0;
9
19
  row-gap: 0;
@@ -68,6 +78,10 @@ $dir_h: ("left": flex-start, "center": center, "right": flex-end);
68
78
  }
69
79
  }
70
80
 
81
+ &.row {
82
+ flex-direction: row;
83
+ }
84
+
71
85
  &.apart {
72
86
  width: 100%;
73
87
  justify-content: space-between;
@@ -1,12 +1,18 @@
1
+ body {
2
+ font-family: $font;
3
+ }
4
+
1
5
  p {
2
6
  margin-bottom: $default_distance;
3
7
  line-height: 1.6;
4
8
  text-rendering: optimizeLegibility;
9
+ font-size: 1 * $default_distance;
5
10
  }
6
11
 
7
12
  a {
8
13
  line-height: inherit;
9
14
  color: $primary_color;
15
+ font-size: 1 * $default_distance;
10
16
  }
11
17
 
12
18
  h1, h2, h3, h4, h5, h6 {
@@ -6,6 +6,7 @@
6
6
  cursor: pointer;
7
7
  background-color: $primary_color;
8
8
  color: $text_on_primary_color;
9
+ font-size: 0.8 * $default_distance;
9
10
 
10
11
  &:hover {
11
12
  background-color: darken($primary_color, 15%);
@@ -0,0 +1,51 @@
1
+ .table {
2
+ width: 100%;
3
+ display: table;
4
+ border-bottom: 2px solid $primary_color;
5
+ overflow-x: scroll;
6
+
7
+ &:not(:first-child) {
8
+ margin-top: 1rem;
9
+ }
10
+
11
+ .thead {
12
+ display: table-header-group;
13
+ position: sticky;
14
+ top: 0;
15
+ background-color: $primary_color;
16
+
17
+ .tr {
18
+ display: table-row;
19
+
20
+ .th {
21
+ display: table-cell;
22
+ font-weight: 300;
23
+ padding: 1rem;
24
+ text-align: left;
25
+ }
26
+ }
27
+ }
28
+
29
+ .tbody {
30
+ display: table-row-group;
31
+
32
+ .tr {
33
+ display: table-row;
34
+
35
+ &:nth-child(2n+1) {
36
+ background: $background_color;
37
+ }
38
+
39
+ .td {
40
+ display: table-cell;
41
+ padding: 1rem;
42
+ border-right: 2px solid $primary_color;
43
+ vertical-align: middle;
44
+
45
+ &:first-child {
46
+ border-left: 2px solid $primary_color;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,92 @@
1
+ form .input, form input[type=submit] {
2
+ margin-top: $default_distance;
3
+ margin-bottom: $default_distance;
4
+
5
+ &.hidden {
6
+ margin: 0;
7
+ }
8
+
9
+ input, select {
10
+ padding: 0.5em;
11
+ color: $text_on_primary_color;
12
+ width: 100%;
13
+
14
+ @media screen and (min-width: $media_breakpoint) {
15
+ width: 500px;
16
+ }
17
+ }
18
+
19
+ label:not(.checkbox) {
20
+ display: block;
21
+ font-size: 0.8em;
22
+ }
23
+
24
+ label.checkbox {
25
+ display: flex;
26
+ align-items: center;
27
+
28
+ input {
29
+ margin-right: 0.3em;
30
+ width: unset;
31
+ }
32
+ }
33
+
34
+ span.radio {
35
+ display: flex;
36
+ align-items: center;
37
+
38
+ label {
39
+ font-size: $default_distance;
40
+ }
41
+
42
+ input {
43
+ margin-right: 0.2em;
44
+ }
45
+ }
46
+ }
47
+
48
+ form {
49
+ .links {
50
+ margin-top: 0.5 * $default_distance;
51
+ }
52
+
53
+ trix-editor, .trix-button {
54
+ background-color: $background_color;
55
+ }
56
+
57
+ .nested-fields {
58
+ border: 1px solid $primary_color;
59
+ padding: 0.5 * $default_distance;
60
+ margin-bottom: 0.5 * $default_distance;
61
+
62
+ .input:first-child {
63
+ margin-top: 0;
64
+ }
65
+
66
+ @media screen and (min-width: $media_breakpoint) {
67
+ display: flex;
68
+
69
+ input {
70
+ width: 200px;
71
+ }
72
+ }
73
+ }
74
+
75
+ span.error {
76
+ background-color: $warning_color;
77
+ margin-left: 0.5em;
78
+ padding: 0.3em;
79
+ }
80
+
81
+ p.info {
82
+ &::before {
83
+ margin-right: 0.3em;
84
+ display: inline-block;
85
+ content: '\1f6c8';
86
+ }
87
+ }
88
+ }
89
+
90
+ p + .btn, p + form.button_to, form + form.button_to {
91
+ margin-top: $default_distance;
92
+ }
@@ -5,9 +5,17 @@ $secondary_color: pink !default;
5
5
  $text_on_secondary_color: black !default;
6
6
  $border_color: green !default;
7
7
  $default_distance: 1rem !default;
8
+ $background_color: white !default;
9
+ $font: 'sans-serif' !default;
10
+
11
+ $warning_color: lighten(red, 40%);
12
+
13
+ $primary_color_light: lighten($primary_color, 10%);
8
14
 
9
15
  @import 'styleguide/01_reset';
10
16
  @import 'styleguide/02_layout';
11
17
  @import 'styleguide/03_grid';
12
18
  @import 'styleguide/04_typo';
13
19
  @import 'styleguide/05_buttons';
20
+ @import 'styleguide/06_tables';
21
+ @import 'styleguide/07_forms';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codefabrik-styleguide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-01 00:00:00.000000000 Z
11
+ date: 2023-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dartsass-rails
@@ -62,6 +62,8 @@ files:
62
62
  - vendor/assets/stylesheets/codefabrik/styleguide/03_grid.scss
63
63
  - vendor/assets/stylesheets/codefabrik/styleguide/04_typo.scss
64
64
  - vendor/assets/stylesheets/codefabrik/styleguide/05_buttons.scss
65
+ - vendor/assets/stylesheets/codefabrik/styleguide/06_tables.scss
66
+ - vendor/assets/stylesheets/codefabrik/styleguide/07_forms.scss
65
67
  homepage: https://code-fabrik.ch
66
68
  licenses:
67
69
  - MIT