pdap-design-system 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +1 -1
- package/README.md +24 -6
- package/package.json +1 -1
- package/system/css/global-styles.css +22 -10
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,18 +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
|
-
|
6
|
-
`
|
5
|
+
|
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.
|
7
11
|
|
8
12
|
# Usage
|
9
|
-
|
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
|
+
|
10
26
|
|
11
|
-
# Context
|
12
|
-
We are making tools for transparency about a serious subject. We are be focused, friendly, and open.
|
13
27
|
|
14
28
|
## Principles
|
15
29
|
This is a first pass, so they're not etched in stone. Open to suggestions.
|
16
30
|
|
31
|
+
We are making tools for transparency about a serious subject. We should be focused, friendly, and open.
|
17
32
|
- Our design should take accessibility seriously.
|
18
33
|
- Keep it simple: things should not do anything they don't need to do.
|
19
34
|
- We should keep our users informed and in control with timely, relevant feedback.
|
@@ -24,4 +39,7 @@ This is a first pass, so they're not etched in stone. Open to suggestions.
|
|
24
39
|
|
25
40
|
## Assets
|
26
41
|
Use these [brand assets](https://docs.pdap.io/meta/about/staff/brand-assets).
|
27
|
-
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;
|
@@ -237,7 +234,6 @@ pre code {
|
|
237
234
|
}
|
238
235
|
.nav {
|
239
236
|
position: relative;
|
240
|
-
background: #dddddd;
|
241
237
|
z-index: 1000;
|
242
238
|
}
|
243
239
|
.nav:before,
|
@@ -536,19 +532,34 @@ strong {
|
|
536
532
|
padding-right: 10px;
|
537
533
|
padding-left: 10px;
|
538
534
|
}
|
539
|
-
|
540
535
|
.nav-container {
|
541
536
|
-webkit-align-self: auto;
|
542
537
|
-ms-flex-item-align: auto;
|
543
538
|
-ms-grid-row-align: auto;
|
544
539
|
align-self: auto;
|
545
540
|
}
|
546
|
-
|
547
541
|
.nav-menu {
|
548
|
-
padding:
|
542
|
+
padding: 10px;
|
549
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% - 76px);
|
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;
|
550
562
|
}
|
551
|
-
|
552
563
|
.navbar {
|
553
564
|
margin-right: -20px;
|
554
565
|
margin-left: -20px;
|
@@ -620,9 +631,10 @@ strong {
|
|
620
631
|
font-size: 18px;
|
621
632
|
}
|
622
633
|
|
623
|
-
.grid-3 {
|
634
|
+
.layout-grid, .grid-2, .grid-3 {
|
624
635
|
grid-column-gap: 15px;
|
625
636
|
grid-row-gap: 15px;
|
637
|
+
grid-template-columns: 1fr;
|
626
638
|
grid-auto-columns: 1fr;
|
627
639
|
-ms-grid-columns: 1fr;
|
628
640
|
}
|
@@ -678,7 +690,7 @@ strong {
|
|
678
690
|
max-width: 80%;
|
679
691
|
}
|
680
692
|
|
681
|
-
.grid, .grid-2 {
|
693
|
+
.layout-grid, .grid-2, .grid-3 {
|
682
694
|
grid-column-gap: 15px;
|
683
695
|
grid-row-gap: 15px;
|
684
696
|
grid-auto-columns: 1fr;
|