Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Dropdown component; add dark variants for dropdown and text fields #862

Merged
merged 27 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
265e3e8
add input-dark
vdepizzol Jul 30, 2019
65bb088
add dark dropdown variation
vdepizzol Jul 30, 2019
e0d481e
include default README file for primer dropdown
vdepizzol Jul 30, 2019
14237e9
add existing dropdown stylesheet from github's css
vdepizzol Jul 30, 2019
f161e7b
whitespace meaningless change
vdepizzol Aug 5, 2019
2d0d537
Merge branch 'master' into input-dark
vdepizzol Aug 5, 2019
990634a
Apply suggestions from @shawnbot
vdepizzol Aug 8, 2019
3125d00
Merge branch 'master' into input-dark
simurai Aug 21, 2019
fcf410b
Update examples to work with doctocat
simurai Aug 21, 2019
32141dc
script/generate-bundle-readmes
simurai Aug 21, 2019
39e4272
:fire: Remove "JavaScript-powered"
simurai Aug 21, 2019
ee62c96
Fix linter
simurai Aug 21, 2019
eeea839
Merge branch 'master' into input-dark
shawnbot Aug 21, 2019
a0fb981
use role="none" for dropdown dividers
vdepizzol Sep 3, 2019
c5b1ba2
fix new bundle diff report
shawnbot Sep 4, 2019
9efaffa
Merge pull request #879 from primer/fix-bundle-size-report
shawnbot Sep 4, 2019
e5b4447
Update src/dropdowns/dropdown.scss
vdepizzol Sep 5, 2019
3739a51
Update src/dropdowns/dropdown.scss
vdepizzol Sep 5, 2019
8048e9a
move to src/product/index.scss per @shawnbot's suggestion
vdepizzol Sep 5, 2019
6964be2
create empty stats for new bundles
shawnbot Sep 5, 2019
4ee534c
rename src/dropdowns to src/dropdown
vdepizzol Sep 5, 2019
df7606e
add dropdown to product instead of core
vdepizzol Sep 5, 2019
3ad0b9f
re-run script/generate-bundle-readmes
shawnbot Sep 5, 2019
bd92767
tighten up dropdown docs front matter
shawnbot Sep 5, 2019
8217df4
status: "New release" -> "New"
shawnbot Sep 5, 2019
21798b6
wrap dropdown examples in container to make them visibles
vdepizzol Sep 5, 2019
dfe0aaf
adjust container wrap in dropdown examples
vdepizzol Sep 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion docs/content/components/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ symbols:
]
---

Dropdowns are lightweight, JavaScript-powered context menus for housing navigation and actions. They're great for instances where you don't need the full power (and code) of the select menu.
Dropdowns are lightweight context menus for housing navigation and actions. They're great for instances where you don't need the full power (and code) of the select menu.

## Basic examples

Expand Down Expand Up @@ -205,3 +205,29 @@ Align the direction of dropdown menus and their arrows with modifier classes.
</div>
</details>
```

### Dark

```html live
<div class="bg-gray-dark p-3 mt-n3 ml-n3 mr-n3" style="min-height: 240px;">
<details class="dropdown details-reset details-overlay d-inline-block">
<summary class="btn" aria-haspopup="true">
Dropdown
<div class="dropdown-caret"></div>
</summary>

<div class="dropdown-menu dropdown-menu-se dropdown-menu-dark">
<div class="dropdown-header">
Dropdown header
</div>
<ul>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li class="dropdown-divider" role="separator"></li>
vdepizzol marked this conversation as resolved.
Show resolved Hide resolved
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
</ul>
</div>
</details>
</div>
```
9 changes: 9 additions & 0 deletions docs/content/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ Make inputs smaller, larger, or full-width with an additional class.
</form>
```

##### Dark

```html live
<div class="bg-gray-dark p-3 mt-n3 ml-n3 mr-n3">
<input class="form-control input-dark" type="text" placeholder="Dark input" aria-label="Dark input">
<input class="form-control input-dark input-sm" type="text" placeholder="Dark input small" aria-label="Dark input">
</div>
```

##### Hide webkit's contact info autofill icon

Webkit sometimes gets confused and tries to add an icon/dropdown to autofill contact information on fields that may not be appropriate (such as input for number of users). Use this class to override the display of this icon.
Expand Down
1 change: 1 addition & 0 deletions src/core/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@import "../box/index.scss";
@import "../breadcrumb/index.scss";
@import "../buttons/index.scss";
@import "../dropdowns/index.scss";
vdepizzol marked this conversation as resolved.
Show resolved Hide resolved
@import "../table-object/index.scss";
@import "../forms/index.scss";
@import "../layout/index.scss";
Expand Down
25 changes: 25 additions & 0 deletions src/dropdowns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
bundle: "dropdowns"
generated: true
---

# Primer CSS: `dropdowns` bundle

## Usage

Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:

```scss
@import "@primer/css/dropdowns/index.scss";
```

## Build

The `@primer/css` npm package includes a standalone CSS build of this module in `dist/dropdowns.css`.

## License

[MIT](https://github.com/primer/css/blob/master/LICENSE) &copy; [GitHub](https://github.com/)


[scss]: https://sass-lang.com/documentation/syntax#scss
Loading