Skip to content

Commit 85a7e52

Browse files
authored
Merge pull request #40 from OneNoteDev/bug/namespace-the-css
Bug/namespace the css
2 parents f36ae9b + 6f76056 commit 85a7e52

File tree

3 files changed

+61
-47
lines changed

3 files changed

+61
-47
lines changed

sampleapp/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="stylesheet" href="dist/pickerStyles.css">
88
</head>
99
<body style="min-height:100%">
10-
<div id="oneNotePicker" style="width:295px;height:180px;margin:50px;overflow-y:scroll"></div>
10+
<div id="oneNotePicker" style="width:350px;height:350px;margin:50px;overflow-y:scroll"></div>
1111
<script src="dist/sample.js"></script>
1212
</body>
1313
</html>

src/oneNotePicker.scss

+59-45
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,63 @@
1-
@import "~bulma/bulma.sass";
2-
3-
#oneNotePicker {
4-
background: white;
5-
-webkit-user-select: none;
6-
-moz-user-select: none;
7-
-ms-user-select: none;
8-
user-select: none;
9-
}
10-
11-
.menu-list li ul {
12-
margin-top: 0px;
13-
margin-bottom: 0px;
14-
margin-right: 0px;
15-
border-left: none;
16-
}
17-
18-
.menu-list li a {
19-
padding-top: 6px;
20-
padding-bottom: 6px;
21-
}
22-
23-
.menu-list li a div {
24-
display: inline-block;
25-
vertical-align: top;
26-
}
27-
28-
.menu-list label {
29-
color: black;
30-
}
31-
32-
.picker-list-header {
33-
margin-top: 0px;
34-
margin-bottom: 0px;
35-
margin-right: 0px;
36-
}
37-
38-
.picker-icon-left {
39-
margin-right: 5px;
40-
41-
img {
1+
#oneNotePicker {
2+
background: white;
3+
-webkit-user-select: none;
4+
-moz-user-select: none;
5+
-ms-user-select: none;
6+
user-select: none;
7+
}
8+
9+
.onenote-picker {
10+
ul {
11+
list-style: none;
12+
padding: 0;
13+
}
14+
15+
.menu-list a {
16+
border-radius: 2px;
17+
color: #4a4a4a;
4218
display: block;
19+
padding: 0.5em 0.75em;
20+
}
21+
22+
.menu-list li ul {
23+
margin-top: 0px;
24+
margin-bottom: 0px;
25+
margin-right: 0px;
26+
border-left: none;
27+
margin: 0.75em;
28+
padding-left: 0.75em;
29+
}
30+
31+
.menu-list li a {
32+
padding-top: 6px;
33+
padding-bottom: 6px;
34+
}
35+
36+
.menu-list li a div {
37+
display: inline-block;
38+
vertical-align: top;
39+
}
40+
41+
.menu-list label {
42+
color: black;
43+
}
44+
45+
.picker-list-header {
46+
margin-top: 0px;
47+
margin-bottom: 0px;
48+
margin-right: 0px;
4349
}
44-
}
4550

46-
.picker-selectedItem {
47-
// Office UI Fabric specifies a hover which has more priority this, hence the !important
48-
background-color: #D0D0D0 !important;
51+
.picker-icon-left {
52+
margin-right: 5px;
53+
54+
img {
55+
display: block;
56+
}
57+
}
58+
59+
.picker-selectedItem {
60+
// Office UI Fabric specifies a hover which has more priority this, hence the !important
61+
background-color: #D0D0D0 !important;
62+
}
4963
}

src/oneNotePicker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface OneNotePickerProps extends GlobalProps {
1111
class OneNotePicker extends React.Component<OneNotePickerProps, null> {
1212
render() {
1313
return (
14-
<div className='ms-fontColor-themePrimary'>
14+
<div className='onenote-picker ms-fontColor-themePrimary'>
1515
<ul role='tree' className='menu-list picker-list-header'>
1616
{this.props.notebooks.map(notebook => <NotebookItem globals={this.props.globals} notebook={notebook} key={notebook.name}></NotebookItem>)}
1717
</ul>

0 commit comments

Comments
 (0)