Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: skin/options.css

Issue 29322581: Issue 2356 - Implemented tooltip functionality (Closed)
Patch Set: Created July 17, 2015, 4:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« options.html ('K') | « options.html ('k') | skin/options-sprite.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skin/options.css
===================================================================
--- a/skin/options.css
+++ b/skin/options.css
@@ -95,12 +95,18 @@
.option-name
{
display: flex;
+ margin-bottom: 16px;
+ margin-top: 24px;
}
-.option-name > *
+.option-name > :first-child
{
- -moz-margin-end: 6px;
- -webkit-margin-end: 6px;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ -moz-margin-end: auto;
saroyanm 2015/07/22 18:25:38 Why do we need "margin-end: auto;" here ?
Thomas Greiner 2015/07/28 14:13:07 Done. Seems to be redundant when using `flex: 1`.
+ -webkit-margin-end: auto;
}
#nav-sidebar
@@ -140,6 +146,11 @@
flex-flow: row wrap;
}
+.flex-container > div
saroyanm 2015/07/22 18:25:38 I do think this rule adding confusion, because thi
Thomas Greiner 2015/07/28 14:13:07 I'd rather avoid having implementation details suc
saroyanm 2015/07/28 17:21:42 Well it does bisect the row, but why each child di
Thomas Greiner 2015/07/28 18:19:22 I see your point. Hardcoding it to 400px is a bad
+{
+ width: 400px;
+}
+
.tabs li
{
cursor: pointer;
@@ -307,7 +318,6 @@
margin: 0px;
padding: 0px;
position: relative;
- width: 400px;
}
.table li
@@ -546,7 +556,6 @@
#custom-wrapper
{
- width: 400px;
height: 290px;
overflow: auto;
}
@@ -747,11 +756,20 @@
width: 10px;
}
+/*
+ Tooltips
+*/
+
.tooltip, #block-element-explanation a
saroyanm 2015/07/22 18:25:39 Why don't just add class ".tooltip" to "#block-ele
Thomas Greiner 2015/07/28 14:13:07 Yes, especially since this part of the page has no
{
- border-bottom: dotted 2px;
+ border-bottom: dashed 1px;
color: #3A7BA6;
+ cursor: default;
font-size: 12px;
+ height: 15px;
+ line-height: 19px;
+ margin: 0px 4px;
+ position: relative;
text-decoration: none;
}
@@ -770,6 +788,88 @@
-webkit-padding-start: 0px;
}
+div[role="tooltip"]
+{
+ background-color: rgba(45, 45, 45, 0.95);
+ border-radius: 3px;
+ color: #FFF;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 18px;
+ margin-top: 14px;
+ max-width: 400px;
saroyanm 2015/07/22 18:25:38 Why we use both max and min width ? Please use "w
Thomas Greiner 2015/07/28 14:13:07 Done.
+ min-width: 400px;
+ opacity: 1;
+ padding: 20px;
+ position: absolute;
+ transition: opacity 200ms ease-in-out 400ms;
saroyanm 2015/07/22 18:25:39 In case we will need to support safari 6.0 we will
Thomas Greiner 2015/07/28 14:13:07 According to MDN, `transition-delay` is still pref
+ z-index: 1;
+ left: -20px;
+}
+
+html[dir="ltr"] div[role="tooltip"].flip-vertical,
+html[dir="rtl"] div[role="tooltip"]:not(.flip-vertical)
+{
+ left: inherit;
+ right: -20px;
+}
+
+.tooltip:not(:hover) > div[role="tooltip"],
+div[role="tooltip"]:hover
saroyanm 2015/07/22 18:25:39 On small screens some tooltips overflow this eleme
Thomas Greiner 2015/07/28 14:13:07 Done. Nice catch!
+{
+ opacity: 0;
+ transition-delay: 0ms;
+}
+
+div[role="tooltip"]::before
+{
+ background-image: url(options-sprite.png);
+ background-position: -8px -42px;
+ content: "";
+ height: 6px;
+ position: absolute;
+ top: -6px;
+ width: 14px;
+ left: 30px;
+}
+
+html[dir="ltr"] div[role="tooltip"].flip-vertical::before,
+html[dir="rtl"] div[role="tooltip"]:not(.flip-vertical)::before
+{
+ left: inherit;
+ right: 30px;
+}
+
+div[role="tooltip"] img
+{
+ float: left;
+ height: 64px;
+ margin-top: -2px;
+ margin-bottom: 10px;
+ width: 64px;
+ -moz-margin-end: 10px;
+ -webkit-margin-end: 10px;
+}
+
+html[dir="rtl"] div[role="tooltip"] img
+{
+ float: right;
+}
+
+div[role="tooltip"] > div:not(:first-of-type)
+{
+ border-top: 1px solid #717171;
+ font-size: 12px;
+ font-weight: 300;
+ margin-top: 14px;
+ padding-top: 14px;
+}
+
+div[role="tooltip"] > div > div:not(:first-child)
+{
+ margin-top: 18px;
+}
+
/*
Help tab content
*/
« options.html ('K') | « options.html ('k') | skin/options-sprite.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld