pdap-design-system 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CONTRIBUTING.md +1 -1
- package/README.md +26 -5
- package/package.json +1 -1
- package/system/css/global-styles.css +22 -13
- package/docs/getting-started.md +0 -6
package/CONTRIBUTING.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
# Contributing
|
2
|
-
For PDAP staff:
|
2
|
+
For PDAP staff: Make changes as needed, but consider how widely this is used. Don't merge things until we test the changes.
|
3
3
|
|
4
4
|
For the public: This is an internal system, but it could easily be forked and altered to meet your needs. Feel free to share potentially useful things back to us in a Pull Request.
|
package/README.md
CHANGED
@@ -2,15 +2,33 @@
|
|
2
2
|
These are styling resources like CSS and templates for new PDAP microservices or branded web projects.
|
3
3
|
|
4
4
|
Open `system/demo.html` to see how things look.
|
5
|
-
`global-styles.css` are the styles used across all PDAP applications.
|
6
|
-
`normalize.css` is used for more consistent cross-browser rendering.
|
7
5
|
|
8
|
-
|
9
|
-
|
6
|
+
`system/css/global-styles.css` are the styles used across all PDAP applications.
|
7
|
+
|
8
|
+
`system/css/normalize.css` is used for more consistent cross-browser rendering.
|
9
|
+
|
10
|
+
`system/images` are icons and brand assets.
|
11
|
+
|
12
|
+
# Usage
|
13
|
+
1. In the project's directory:
|
14
|
+
|
15
|
+
```
|
16
|
+
npm install pdap-design-system
|
17
|
+
```
|
18
|
+
|
19
|
+
2. Without moving the CSS files, reference them like this:
|
20
|
+
|
21
|
+
```
|
22
|
+
<link href="node_modules/pdap-design-system/system/css/normalize.css" rel="stylesheet" type="text/css">
|
23
|
+
<link href="node_modules/pdap-design-system/system/css/global-styles.css" rel="stylesheet" type="text/css">
|
24
|
+
```
|
25
|
+
|
26
|
+
|
10
27
|
|
11
28
|
## Principles
|
12
29
|
This is a first pass, so they're not etched in stone. Open to suggestions.
|
13
30
|
|
31
|
+
We are making tools for transparency about a serious subject. We should be focused, friendly, and open.
|
14
32
|
- Our design should take accessibility seriously.
|
15
33
|
- Keep it simple: things should not do anything they don't need to do.
|
16
34
|
- We should keep our users informed and in control with timely, relevant feedback.
|
@@ -21,4 +39,7 @@ This is a first pass, so they're not etched in stone. Open to suggestions.
|
|
21
39
|
|
22
40
|
## Assets
|
23
41
|
Use these [brand assets](https://docs.pdap.io/meta/about/staff/brand-assets).
|
24
|
-
Use this [terminology](https://docs.pdap.io/activities/terms-and-definitions).
|
42
|
+
Use this [terminology](https://docs.pdap.io/activities/terms-and-definitions).
|
43
|
+
|
44
|
+
## Other notes
|
45
|
+
This is based on the PDAP website, which was originally created in Webflow. That might explain some of the CSS browser compatibility choices.
|
package/package.json
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
/* These were originally created in webflow. */
|
2
|
-
/* Anything we needed from webflow.css was added here, so that's why there are some w- classes. */
|
3
|
-
|
4
1
|
* {
|
5
2
|
-webkit-box-sizing: border-box;
|
6
3
|
-moz-box-sizing: border-box;
|
@@ -138,9 +135,6 @@ pre code {
|
|
138
135
|
text-align:left;
|
139
136
|
}
|
140
137
|
|
141
|
-
.nav-menu-icon:before {
|
142
|
-
content: "\e602";
|
143
|
-
}
|
144
138
|
.form {
|
145
139
|
margin: 0 0 15px;
|
146
140
|
width:100%;
|
@@ -240,7 +234,6 @@ pre code {
|
|
240
234
|
}
|
241
235
|
.nav {
|
242
236
|
position: relative;
|
243
|
-
background: #dddddd;
|
244
237
|
z-index: 1000;
|
245
238
|
}
|
246
239
|
.nav:before,
|
@@ -539,19 +532,34 @@ strong {
|
|
539
532
|
padding-right: 10px;
|
540
533
|
padding-left: 10px;
|
541
534
|
}
|
542
|
-
|
543
535
|
.nav-container {
|
544
536
|
-webkit-align-self: auto;
|
545
537
|
-ms-flex-item-align: auto;
|
546
538
|
-ms-grid-row-align: auto;
|
547
539
|
align-self: auto;
|
548
540
|
}
|
549
|
-
|
550
541
|
.nav-menu {
|
551
|
-
padding:
|
542
|
+
padding: 10px;
|
552
543
|
background-color: #bfc0c0;
|
544
|
+
display: none;
|
545
|
+
position: fixed;
|
546
|
+
top: 100%;
|
547
|
+
left: 0;
|
548
|
+
width: 100%; /* Full width */
|
549
|
+
height: calc(100% - 112px);
|
550
|
+
z-index: 999;
|
551
|
+
flex-direction: column;
|
552
|
+
align-items: center;
|
553
|
+
justify-content: center;
|
554
|
+
overflow-y: auto; /* In case the links exceed viewport height */
|
555
|
+
transition: transform 0.3s ease; /* Smooth transition for showing and hiding the menu */
|
556
|
+
transform: translateY(-100%); /* Hide the menu by default */
|
557
|
+
}
|
558
|
+
.nav-link {
|
559
|
+
color: white;
|
560
|
+
margin: 10px 0;
|
561
|
+
text-decoration: none;
|
553
562
|
}
|
554
|
-
|
555
563
|
.navbar {
|
556
564
|
margin-right: -20px;
|
557
565
|
margin-left: -20px;
|
@@ -623,9 +631,10 @@ strong {
|
|
623
631
|
font-size: 18px;
|
624
632
|
}
|
625
633
|
|
626
|
-
.grid-3 {
|
634
|
+
.layout-grid, .grid-2, .grid-3 {
|
627
635
|
grid-column-gap: 15px;
|
628
636
|
grid-row-gap: 15px;
|
637
|
+
grid-template-columns: 1fr;
|
629
638
|
grid-auto-columns: 1fr;
|
630
639
|
-ms-grid-columns: 1fr;
|
631
640
|
}
|
@@ -681,7 +690,7 @@ strong {
|
|
681
690
|
max-width: 80%;
|
682
691
|
}
|
683
692
|
|
684
|
-
.grid, .grid-2 {
|
693
|
+
.layout-grid, .grid-2, .grid-3 {
|
685
694
|
grid-column-gap: 15px;
|
686
695
|
grid-row-gap: 15px;
|
687
696
|
grid-auto-columns: 1fr;
|