ethosstyles 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +87 -0
- data/app/assets/stylesheets/_ethosstyles.scss +2 -0
- data/app/assets/stylesheets/components/_base.scss +4 -0
- data/app/assets/stylesheets/components/_blurbs.scss +96 -5
- data/app/assets/stylesheets/components/_buttons.scss +3 -2
- data/app/assets/stylesheets/components/_forms.scss +128 -3
- data/app/assets/stylesheets/components/_grid.scss +36 -3
- data/app/assets/stylesheets/components/_highlights.scss +17 -0
- data/app/assets/stylesheets/components/_icons.scss +1 -0
- data/app/assets/stylesheets/components/_list-groups.scss +32 -0
- data/app/assets/stylesheets/components/_lists.scss +28 -7
- data/app/assets/stylesheets/components/_logs.scss +15 -0
- data/app/assets/stylesheets/components/_notes.scss +43 -0
- data/app/assets/stylesheets/components/_notices.scss +19 -0
- data/app/assets/stylesheets/components/_panels.scss +35 -1
- data/app/assets/stylesheets/components/_tables.scss +68 -13
- data/app/assets/stylesheets/components/_tooltips.scss +18 -21
- data/app/assets/stylesheets/pages/_styleguide.scss +6 -0
- data/app/assets/stylesheets/utilities/_mixins.scss +7 -33
- data/app/assets/stylesheets/utilities/_utilities.scss +10 -1
- data/app/views/blurbs.php +31 -0
- data/app/views/forms.php +68 -0
- data/app/views/grid.php +19 -0
- data/app/views/index.php +56 -2
- data/app/views/list-groups.php +69 -8
- data/app/views/logs.php +12 -0
- data/app/views/notes.php +10 -0
- data/app/views/notices.php +11 -0
- data/app/views/panels.php +8 -0
- data/app/views/partial_tooltips.php +6 -16
- data/app/views/tables.php +102 -0
- data/app/views/tooltips.php +6 -10
- data/lib/ethosstyles/version.rb +1 -1
- metadata +13 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db4480dda5a560203ecd5a27cbb7e941c578d7f
|
4
|
+
data.tar.gz: b70b02bb00c73df116d2975b3807c967f655d544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ae30fd6e9c0e3d3768a3e8e7983d5959cdcc9963e597dae7cbe854e47f0d80d7a4d4d6cd29c4f6608f5f17594f2a1084a298f9667862e9054701210232ef67
|
7
|
+
data.tar.gz: 92f7508242f86c13455f8201cebdee5cd144bce6ce9e83025f88820e09aa97ef17e76f1034b5442550e0209b2b236f7c8790f518a9611a22663cc378014dfba5
|
data/README.md
CHANGED
@@ -4,6 +4,93 @@ These are Ethos's main styles.
|
|
4
4
|
|
5
5
|
Note: These are foundational styles, and should be edited sparingly. You can still add styles to Moonbeam and OrCA in the `stylesheets` directories.
|
6
6
|
|
7
|
+
## Stardust Development Guide
|
8
|
+
|
9
|
+
|
10
|
+
1. **Building Stardust Locally**:
|
11
|
+
- Download [Stardust repo](https://git.corp.adobe.com/adobe-platform/stardust).
|
12
|
+
- Build with command `make dev`
|
13
|
+
|
14
|
+
**Troubleshooting**:
|
15
|
+
- You may need to [install sass](https://sass-lang.com/install).
|
16
|
+
- If you're using a VPN, you may need to re-run `docker-machine-nfs [MACHINE-NAME]`
|
17
|
+
|
18
|
+
2. **Develop new elements in Moonbeam**
|
19
|
+
|
20
|
+
**Goal**: Create elements available for use in current and future Moonbeam UI.
|
21
|
+
|
22
|
+
Develop new elements for Moonbeam in `moonbeam/app/assets/stylesheets/components/_rf-for-gem.scss`.
|
23
|
+
- Prefix new styles with `.rf-`
|
24
|
+
- Make sure new styles are [BEM-ified](https://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/)
|
25
|
+
|
26
|
+
3. **Port new elements to Stardust repo**:
|
27
|
+
|
28
|
+
**Goal**: Add styles to Stardust and demonstrate their intended use.
|
29
|
+
|
30
|
+
Involved files:
|
31
|
+
- `app/assets/stylesheets/components/<new-element>.scss`
|
32
|
+
- Copy the styles directly from `_rf-for-gem.scss` in Moonbeam and paste them here. Your code here must match what is in `_rf-for-gem.scss`.
|
33
|
+
- Demonstrate suggested use with HTML in the comments. For example, from [\_tables.scss](https://git.corp.adobe.com/adobe-platform/stardust/blob/master/app/assets/stylesheets/components/_tables.scss):
|
34
|
+
```
|
35
|
+
//
|
36
|
+
// Tables
|
37
|
+
//
|
38
|
+
|
39
|
+
//
|
40
|
+
// Structure
|
41
|
+
//
|
42
|
+
//<table class="rf-table">
|
43
|
+
// <tr class="rf-table__row rf-table__row--header">
|
44
|
+
// <th class="rf-table__th">Product</th>
|
45
|
+
// <th class="rf-table__th">Name</th>
|
46
|
+
// </tr>
|
47
|
+
// <tbody class="rf-table__body">
|
48
|
+
// <tr class="rf-table__row">
|
49
|
+
// <td class="rf-table__td"> Cell #1</td>
|
50
|
+
// <td class="rf-table__td"> Cell #2</td>
|
51
|
+
// </tr>
|
52
|
+
// </tbody>
|
53
|
+
//</table>
|
54
|
+
//
|
55
|
+
// Best Practices
|
56
|
+
//
|
57
|
+
// Set column widths in the header
|
58
|
+
//
|
59
|
+
```
|
60
|
+
- `index.php`:
|
61
|
+
Add a new section to the display page for the new element
|
62
|
+
- `app/views/`:
|
63
|
+
- `<new-element>.php`
|
64
|
+
Create new section for the new element
|
65
|
+
- `partial_<new-element>.php`:
|
66
|
+
Use to prevent repetitive code
|
67
|
+
- `app/assets/stylesheets/_ethosstyles.scss`
|
68
|
+
- Add an `@import` statement for the new element's stylesheet
|
69
|
+
|
70
|
+
4. **Update GEM**
|
71
|
+
|
72
|
+
Follow [these instructions](https://adobe.sharepoint.com/:w:/r/sites/EthosPlatformEngineering/Shared%20Documents/Component%20and%20Initiative%20Folders/UI%26UX/Documentation/How%20to%20Publish%20Stardust.docx?d=w27fb8ea13235422d93a52b5608b05791&csf=1&e=IA7QwM) to update the GEM version.
|
73
|
+
|
74
|
+
In order for changes to show up in Moonbeam you may need to:
|
75
|
+
- Clear containters:
|
76
|
+
```
|
77
|
+
docker rm -f $(docker ps -a|grep -v moonbeam_db|grep -v CONTAINER|awk '{print $1}')
|
78
|
+
docker start moonbeam_db
|
79
|
+
flotilla up moonbeam
|
80
|
+
```
|
81
|
+
|
82
|
+
- Force a recompiling of the scss elements by editing `application.scss` (for example, add `body {background-color: yellow;}` and save).
|
83
|
+
|
84
|
+
5. **Update Moonbeam**
|
85
|
+
|
86
|
+
**Goal**: Styles are sourced solely from Stardust GEM.
|
87
|
+
|
88
|
+
Remove redundant code from:
|
89
|
+
- Outdated Moonbeam stylehseets
|
90
|
+
- `_rf-for-gem.scss`
|
91
|
+
|
92
|
+
|
93
|
+
|
7
94
|
## To edit gem
|
8
95
|
To develop this gem locally:
|
9
96
|
|
@@ -24,6 +24,7 @@
|
|
24
24
|
@import 'components/list-groups';
|
25
25
|
@import 'components/logs';
|
26
26
|
@import 'components/modal';
|
27
|
+
@import 'components/notes';
|
27
28
|
@import 'components/notices';
|
28
29
|
@import 'components/panels';
|
29
30
|
@import 'components/pills';
|
@@ -34,5 +35,6 @@
|
|
34
35
|
@import 'components/timestamp';
|
35
36
|
@import 'components/tooltips';
|
36
37
|
@import 'components/well';
|
38
|
+
@import 'components/highlights';
|
37
39
|
|
38
40
|
@import 'pages/styleguide';
|
@@ -1,6 +1,13 @@
|
|
1
1
|
//
|
2
2
|
// BLURBS
|
3
|
-
//
|
3
|
+
//
|
4
|
+
|
5
|
+
//
|
6
|
+
// Structure
|
7
|
+
//
|
8
|
+
// <div class="rf-blurb rf-blurb--[modifier]">
|
9
|
+
// <p>Body</p>
|
10
|
+
// </div>
|
4
11
|
//
|
5
12
|
|
6
13
|
.rf-blurb {
|
@@ -17,21 +24,105 @@
|
|
17
24
|
border-radius: 10px;
|
18
25
|
content: '';
|
19
26
|
display: block;
|
20
|
-
font-family:
|
27
|
+
font-family: $font-icon-f5;
|
21
28
|
font-size: 18px;
|
22
|
-
height: 18px;
|
23
29
|
left: -11px;
|
30
|
+
line-height: 19px;
|
31
|
+
height: 18px;
|
24
32
|
position: absolute;
|
25
|
-
top:
|
33
|
+
top: 14px;
|
26
34
|
width: 18px;
|
27
35
|
}
|
36
|
+
|
37
|
+
p:last-child {
|
38
|
+
margin-bottom: 0;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
//
|
43
|
+
// BLURB TYPES
|
44
|
+
//
|
45
|
+
|
46
|
+
// INFO
|
47
|
+
|
48
|
+
.rf-blurb--info {
|
49
|
+
border-left: 4px solid $blue-bright;
|
50
|
+
|
51
|
+
&:before {
|
52
|
+
color: $blue-bright;
|
53
|
+
content: "\f05a";
|
54
|
+
}
|
28
55
|
}
|
29
56
|
|
57
|
+
// SUCCESS
|
58
|
+
|
59
|
+
.rf-blurb--success {
|
60
|
+
border-left: 4px solid $green;
|
61
|
+
|
62
|
+
&:before {
|
63
|
+
color: $green;
|
64
|
+
content: "\f058";
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// WARNING
|
69
|
+
|
70
|
+
.rf-blurb--warning {
|
71
|
+
border-left: 4px solid $gold;
|
72
|
+
|
73
|
+
&:before {
|
74
|
+
color: $gold;
|
75
|
+
content: "\f071";
|
76
|
+
left: -12px;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
// ERROR
|
81
|
+
|
30
82
|
.rf-blurb--error {
|
31
83
|
border-left: 4px solid $red;
|
32
84
|
|
33
85
|
&:before {
|
34
86
|
color: $red;
|
35
|
-
content: "\
|
87
|
+
content: "\f06a";
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
// HIGHLIGHT
|
92
|
+
|
93
|
+
.rf-blurb--highlight {
|
94
|
+
background-color: $baby-blue;
|
95
|
+
|
96
|
+
&:before {
|
97
|
+
display: none;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
// PLAIN (NO ICON)
|
102
|
+
|
103
|
+
.rf-blurb--plain:before {
|
104
|
+
display: none;
|
105
|
+
}
|
106
|
+
|
107
|
+
// CONDENSED
|
108
|
+
|
109
|
+
.rf-blurb--condensed {
|
110
|
+
padding-bottom: 10px;
|
111
|
+
padding-top: 10px;
|
112
|
+
|
113
|
+
// Moves blurb icon up to account for different margins
|
114
|
+
&:before {
|
115
|
+
top: 10px;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
// LARGE
|
120
|
+
|
121
|
+
.rf-blurb--large {
|
122
|
+
@extend .rf-p--lead;
|
123
|
+
padding: $list-padding * 2;
|
124
|
+
|
125
|
+
&:before {
|
126
|
+
top: 28px;
|
36
127
|
}
|
37
128
|
}
|
@@ -95,8 +95,9 @@ $btn-padding-x: $btn-padding-y * 1.8;
|
|
95
95
|
&:after {
|
96
96
|
content: "\f0d7";
|
97
97
|
display: inline-block;
|
98
|
-
font-family: $font-icon-
|
98
|
+
font-family: $font-icon-f5;
|
99
99
|
font-size: .8em;
|
100
|
+
font-weight: 900;
|
100
101
|
line-height: 1em;
|
101
102
|
margin-left: 7px;
|
102
103
|
}
|
@@ -121,7 +122,7 @@ $btn-padding-x: $btn-padding-y * 1.8;
|
|
121
122
|
color: $white;
|
122
123
|
content: "\f071";
|
123
124
|
display: inline-block;
|
124
|
-
font-family: $font-icon-
|
125
|
+
font-family: $font-icon-f5;
|
125
126
|
font-size: 1em;
|
126
127
|
line-height: .6em;
|
127
128
|
margin-right: 4px;
|
@@ -2,6 +2,27 @@
|
|
2
2
|
// FORMS
|
3
3
|
//
|
4
4
|
|
5
|
+
//
|
6
|
+
// Structure
|
7
|
+
//
|
8
|
+
// <form class="rf-form">
|
9
|
+
// <h2>Form Title</h2>
|
10
|
+
// ...
|
11
|
+
// <div class="rf-form-group rf-form-group--[modifiers]">
|
12
|
+
// <div class="rf-label rf-label--[modifiers]">Input Label</div>
|
13
|
+
// <input class="rf-form-control" type="text" placeholder="placeholder text">
|
14
|
+
// </div>
|
15
|
+
// ...
|
16
|
+
// <input class="rf-btn rf-btn--primary" type="submit" value="Submit">
|
17
|
+
// </form>
|
18
|
+
//
|
19
|
+
|
20
|
+
// TEXT
|
21
|
+
|
22
|
+
textarea {
|
23
|
+
min-height: 68px;
|
24
|
+
}
|
25
|
+
|
5
26
|
%rf-form-control--text {
|
6
27
|
background-color: $white;
|
7
28
|
border: $input-border-default;
|
@@ -31,10 +52,18 @@
|
|
31
52
|
padding-bottom: $input-padding-v;
|
32
53
|
}
|
33
54
|
|
55
|
+
// FORM CONTROL
|
56
|
+
|
57
|
+
.rf-form-control[disabled] {
|
58
|
+
@extend .rf-u-disabled;
|
59
|
+
}
|
60
|
+
|
34
61
|
.rf-form-control {
|
35
62
|
@extend %rf-form-control--text;
|
36
63
|
color: $charcoal;
|
64
|
+
cursor: auto;
|
37
65
|
height: 34px;
|
66
|
+
max-width: 340px;
|
38
67
|
padding: $input-padding-v $input-padding-h;
|
39
68
|
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
40
69
|
|
@@ -43,31 +72,127 @@
|
|
43
72
|
}
|
44
73
|
}
|
45
74
|
|
75
|
+
// FORM GROUP
|
76
|
+
|
46
77
|
.rf-form-group {
|
47
78
|
display: block;
|
48
|
-
margin-bottom:
|
79
|
+
margin-bottom: 18px;
|
49
80
|
}
|
50
81
|
|
51
82
|
.rf-form-group:last-child {
|
52
83
|
margin-bottom: 0;
|
53
84
|
}
|
54
85
|
|
86
|
+
.rf-form-group--condensed {
|
87
|
+
margin-bottom: 6px;
|
88
|
+
}
|
89
|
+
|
90
|
+
//
|
91
|
+
// INLINE FORMS
|
92
|
+
//
|
93
|
+
|
94
|
+
//
|
95
|
+
// Structures
|
96
|
+
//
|
97
|
+
// <div class="rf-label rf-label--[modifiers]">Labels</div>
|
98
|
+
// <div class="rf-form-group--inline">
|
99
|
+
// <input class="rf-form-control" type="text" placeholder="placeholder text">
|
100
|
+
// <input class="rf-btn rf-btn--primary" type="submit" value="Submit">
|
101
|
+
// </div>
|
102
|
+
//
|
103
|
+
|
55
104
|
.rf-form-group--inline {
|
56
105
|
align-items: center;
|
57
106
|
display: flex;
|
58
|
-
justify-content:
|
107
|
+
justify-content: flex-start;
|
59
108
|
|
60
109
|
.rf-label {
|
61
110
|
margin-bottom: 0;
|
62
|
-
margin-left:
|
111
|
+
margin-left: 0;
|
63
112
|
margin-right: 4px;
|
64
113
|
}
|
114
|
+
|
115
|
+
.rf-btn {
|
116
|
+
margin-left: 10px;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
.rf-form-group__msg {
|
121
|
+
display: none;
|
122
|
+
font-size: 12px;
|
123
|
+
line-height: 12px;
|
65
124
|
}
|
66
125
|
|
126
|
+
// FORM CONTROL AND MESSAGE SIZES
|
127
|
+
|
128
|
+
.rf-form-control--small,
|
129
|
+
.rf-form-group__msg--small {
|
130
|
+
width: 60px;
|
131
|
+
}
|
132
|
+
|
133
|
+
// FORM ERRORS
|
134
|
+
|
135
|
+
.rf-form-control--error {
|
136
|
+
border-color: $red;
|
137
|
+
}
|
138
|
+
|
139
|
+
.rf-form-group__msg--error {
|
140
|
+
color: $red;
|
141
|
+
}
|
142
|
+
|
143
|
+
// LABELS
|
144
|
+
|
67
145
|
.rf-label--inline {
|
68
146
|
margin-bottom: 0;
|
69
147
|
}
|
70
148
|
|
149
|
+
.rf-label,
|
150
|
+
%rf-label {
|
151
|
+
display: block;
|
152
|
+
font-size: 13px;
|
153
|
+
font-weight: 600;
|
154
|
+
}
|
155
|
+
|
156
|
+
// REQUIRED NOTATION FOR FORMS
|
157
|
+
|
158
|
+
.rf-label--required,
|
159
|
+
%rf-label--required {
|
160
|
+
&:after {
|
161
|
+
color: $blue-bright;
|
162
|
+
content: '*';
|
163
|
+
display: inline-block;
|
164
|
+
font-size: 1.2em;
|
165
|
+
margin-left: 1px;
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
169
|
+
// PLACEHOLDER STYLING FOR INPUTS
|
170
|
+
|
171
|
+
input { @include placeholder {
|
172
|
+
color: $stormy;
|
173
|
+
font-style: italic;
|
174
|
+
font-weight: normal;
|
175
|
+
}}
|
176
|
+
|
177
|
+
::-moz-placeholder {
|
178
|
+
opacity: 1; // Firefox automatically fades placeholders
|
179
|
+
}
|
180
|
+
|
71
181
|
.rf-editable-text {
|
72
182
|
width: 100%;
|
183
|
+
|
184
|
+
a {
|
185
|
+
color: $slate;
|
186
|
+
text-decoration: underline;
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
// MULTISELECT
|
191
|
+
|
192
|
+
.rf-form-control--multiselect {
|
193
|
+
padding: 0;
|
194
|
+
|
195
|
+
option {
|
196
|
+
padding: 0 6px;
|
197
|
+
}
|
73
198
|
}
|