a few changes in the popup look based on #38

This commit is contained in:
Jeremy Schomery 2017-03-06 17:24:56 +03:30
parent 277a180cd0
commit 0646f6bd65
3 changed files with 67 additions and 22 deletions

View File

@ -266,7 +266,7 @@
"description": "Text displayed when no styles are installed for the current site" "description": "Text displayed when no styles are installed for the current site"
}, },
"openManage": { "openManage": {
"message": "Manage installed styles", "message": "Manage",
"description": "Link to open the manage page." "description": "Link to open the manage page."
}, },
"openOptionsManage": { "openOptionsManage": {
@ -274,7 +274,7 @@
"description": "Go to Options UI" "description": "Go to Options UI"
}, },
"openOptionsPopup": { "openOptionsPopup": {
"message": "Options UI", "message": "Options",
"description": "Go to Options UI" "description": "Go to Options UI"
}, },
"openOptionsShortcuts": { "openOptionsShortcuts": {

View File

@ -1,13 +1,13 @@
body { body {
width: 200px; width: 240px;
font-size: 13px; font-size: 12px;
font-family: Arial,"Helvetica Neue",Helvetica,sans-serif; font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
} }
input[type=checkbox] { input[type=checkbox] {
outline: none; outline: none;
} }
#disable-all-wrapper { #disable-all-wrapper {
padding: 0.2em 0 0.7em; padding: 0.7em 0 0.7em;
} }
#disable-all-wrapper .main-controls { #disable-all-wrapper .main-controls {
padding-top: 0.1em; padding-top: 0.1em;
@ -27,9 +27,6 @@ input[type=checkbox] {
margin-bottom: 2px; margin-bottom: 2px;
display: block; display: block;
} }
.actions {
font-size: x-small;
}
a, a:visited { a, a:visited {
color: black; color: black;
} }
@ -49,14 +46,11 @@ a, a:visited {
.entry { .entry {
padding: 0.5em 0; padding: 0.5em 0;
border-bottom: 1px solid black;
} }
.entry:first-child { .entry:first-child {
padding-top: 0; padding-top: 0;
} }
.entry:last-child {
border-bottom: none;
}
body > DIV { body > DIV {
border-bottom: 1px solid black; border-bottom: 1px solid black;
padding-bottom: 2px; padding-bottom: 2px;
@ -68,7 +62,7 @@ body.blocked > DIV {
#installed { #installed {
margin-top: 0.5em; margin-top: 0.5em;
} }
#installed.disabled .style-name { #installed .disabled .style-name {
text-decoration: line-through; text-decoration: line-through;
} }
#installed .actions a { #installed .actions a {
@ -141,3 +135,54 @@ body:not(.blocked) #unavailable {
color: inherit; color: inherit;
text-decoration: underline; text-decoration: underline;
} }
/* action buttons */
#popup-options {
display: flex;
flex-direction: row;
justify-content: space-around;
padding: 1.2em 0;
}
#popup-options button {
margin: 0 2px;
width: 33%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* margins */
body {
margin: 0;
}
body>div:not(#installed) {
margin-left:0.75em;
margin-right:0.75em;
}
#unavailable {
margin-top: 0.75em;
}
#installed .entry {
}
/* entries */
#installed .entry {
display: flex;
align-items: center;
padding: 5px 0.75em;
}
#installed .entry:nth-child(even) {
background-color: rgba(0, 0, 0, 0.05);
}
#installed .main-controls {
display: flex;
flex: 1;
width: calc(100% - 20px);
align-items: center;
}
#installed .main-controls label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 5px;
}

View File

@ -45,21 +45,21 @@
</div> </div>
<div class="left-gutter"></div> <div class="left-gutter"></div>
<div class="main-controls"> <div class="main-controls">
<div id="manage-styles">
<button id="popup-manage-button" i18n-text="openManage"></button>
</div>
<div id="popup-options">
<button id="popup-options-button" i18n-text="openOptionsPopup">
<button id="popup-shortcuts-button" i18n-text="openShortcutsPopup"></button>
</div>
<div id="find-styles"> <div id="find-styles">
<a id="find-styles-link" href="#" i18n-text="findStylesForSite"></a> <a id="find-styles-link" href="#" i18n-text="findStylesForSite"></a>
</div> </div>
<div id="write-style"><span id="write-style-for" i18n-text="writeStyleFor"><br></span> <div id="write-style">
<span id="write-style-for" i18n-text="writeStyleFor"><br></span>
</div> </div>
</div> </div>
<!-- Actions -->
<div id="popup-options">
<button id="popup-manage-button" i18n-text="openManage"></button>
<button id="popup-options-button" i18n-text="openOptionsPopup">
<button id="popup-shortcuts-button" i18n-text="openShortcutsPopup"></button>
</div>
</div> </div>
<script src="popup.js"></script> <script src="popup.js"></script>
</body> </body>
</html> </html>