Skip to content

Commit

Permalink
style touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoitch committed Sep 4, 2014
1 parent 83a73ff commit 7752de9
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 52 deletions.
6 changes: 3 additions & 3 deletions demo/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

body {
font-family: "Helvetica Neue", Helvetica, sans-serif;
color: #333;
color: #454545;
margin: 0;
padding: 0;
}
Expand All @@ -32,10 +32,10 @@ header {
left:0; right:0; top: 0;
z-index: 10;
height: 3.125em;
background-color: rgba(252,252,252,0.92);
border-bottom: 1px solid #e0e0e0;
box-shadow: 0 1px 2px rgba(0,0,0,.03);
color: #454545;
background: rgba(252,252,252,0.92);
background: linear-gradient(to bottom, rgba(252,252,252,0.92) 0%,rgba(252,252,252,0.97) 100%);
}

.demo-title {
Expand Down
Binary file modified demo/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 70 additions & 25 deletions dist/content-kit-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.ck-editor {
font-family: Georgia, serif;
margin: 1em 0;
color: #333;
color: #454545;
/*
Chrome bug adds inline styles when backspacing to join 2 blocks.
Fix: Apply font styles to parent element, or use % for font-size, line-height.
Expand Down Expand Up @@ -52,39 +52,44 @@
background: -ms-linear-gradient(top, rgba(74, 74, 74, 0.97) 0%, #2b2b2b 100%);
background: linear-gradient(to bottom, rgba(74, 74, 74, 0.97) 0%, #2b2b2b 100%);
box-shadow: 0 1px 3px -1px rgba(0, 0, 0, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.12), inset 1px 1px 0 #282828, inset -1px -1px 0 #282828;
border-radius: 5px;
border-radius: 3px;
transition: left 0.1s, top 0.1s;
margin-bottom: 0.6em;
/* space for arrow */
margin-bottom: 0.45em;
}
.ck-toolbar:after {
content: '';
position: absolute;
left: 50%;
width: 0;
height: 0;
border-left: 0.5em solid transparent;
border-right: 0.5em solid transparent;
border-top: 0.5em solid #2b2b2b;
bottom: -0.45em;
margin: 0 0 0 -0.5em;
border-left: 0.45em solid transparent;
border-right: 0.45em solid transparent;
border-top: 0.45em solid #2b2b2b;
bottom: -0.4em;
margin: 0 0 0 -0.45em;
}
.ck-toolbar.right {
margin: 0 0 0 0.5em;
}
.ck-toolbar.right:after {
left: -0.95em;
left: -0.4em;
top: 50%;
bottom: auto;
margin: -0.5em 0 0 0;
border-top: 0.5em solid transparent;
border-bottom: 0.5em solid transparent;
border-right: 0.5em solid #393939;
margin: -0.45em 0 0 0;
border-top: 0.45em solid transparent;
border-bottom: 0.45em solid transparent;
border-right: 0.45em solid #3d3d3d;
border-left: none;
}
.ck-toolbar,
.ck-toolbar-prompt {
-webkit-animation: pop 0.25s;
animation: pop 0.25s;
-webkit-animation: pop-up 0.25s;
animation: pop-up 0.25s;
}
.ck-toolbar.right,
.ck-toolbar.right .ck-toolbar-prompt {
-webkit-animation: pop-right 0.25s;
animation: pop-right 0.25s;
}
.ck-toolbar-buttons {
border-radius: 5px;
Expand All @@ -103,17 +108,17 @@
height: 44px;
line-height: 42px;
cursor: pointer;
transition: background-color 0.15s;
text-shadow: 0 1px rgba(0, 0, 0, 0.7);
transition: background-color 0.1s linear;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.65);
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
.ck-toolbar-btn:hover {
background-color: rgba(43, 43, 43, 0.5);
background-color: rgba(43, 43, 43, 0.4);
}
.ck-toolbar-btn:active {
background-color: rgba(43, 43, 43, 0.75);
background-color: rgba(43, 43, 43, 0.65);
}
.ck-toolbar-btn:active,
.ck-toolbar-btn.active {
Expand Down Expand Up @@ -217,9 +222,9 @@
font-size: 2em;
line-height: 0.7em;
cursor: pointer;
transition: color 0.15s, border-color 0.15s, transform 0.35s;
-webkit-animation: pop 0.25s;
animation: pop 0.25s;
transition: color 0.1s, border-color 0.1s, transform 0.35s;
-webkit-animation: pop-out 0.25s;
animation: pop-out 0.25s;
}
.ck-embed-intent-btn:hover {
color: #999;
Expand Down Expand Up @@ -447,7 +452,27 @@
background-position: 288px 0;
}
}
@-webkit-keyframes pop {
@-webkit-keyframes pop-out {
0% {
opacity: 0.8;
-webkit-transform: scale(0.8);
}
50% {
opacity: 1;
-webkit-transform: scale(1.1);
}
}
@keyframes pop-out {
0% {
opacity: 0.8;
transform: scale(0.8);
}
50% {
opacity: 1;
transform: scale(1.1);
}
}
@-webkit-keyframes pop-up {
0% {
opacity: 0.8;
-webkit-transform: scale(0.9) translateY(14px);
Expand All @@ -457,7 +482,7 @@
-webkit-transform: scale(1.05) translateY(-4px);
}
}
@keyframes pop {
@keyframes pop-up {
0% {
opacity: 0.8;
transform: scale(0.9) translateY(14px);
Expand All @@ -467,3 +492,23 @@
transform: scale(1.05) translateY(-4px);
}
}
@-webkit-keyframes pop-right {
0% {
opacity: 0.8;
-webkit-transform: scale(0.9) translateX(-14px);
}
50% {
opacity: 1;
-webkit-transform: scale(1.05) translateX(4px);
}
}
@keyframes pop-right {
0% {
opacity: 0.8;
transform: scale(0.9) translateX(-14px);
}
50% {
opacity: 1;
transform: scale(1.05) translateX(4px);
}
}
26 changes: 24 additions & 2 deletions src/css/animations.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,35 @@
100% { background-position: 288px 0; }
}

@-webkit-keyframes pop {
@-webkit-keyframes pop-out {
0% { opacity: 0.8; -webkit-transform: scale(0.8) }
50% { opacity: 1; -webkit-transform: scale(1.1) }
100% { }
}
@keyframes pop-out {
0% { opacity: 0.8; transform: scale(0.8) }
50% { opacity: 1; transform: scale(1.1) }
100% { }
}

@-webkit-keyframes pop-up {
0% { opacity: 0.8; -webkit-transform: scale(0.9) translateY(14px); }
50% { opacity: 1; -webkit-transform: scale(1.05) translateY(-4px); }
100% { }
}
@keyframes pop {
@keyframes pop-up {
0% { opacity: 0.8; transform: scale(0.9) translateY(14px); }
50% { opacity: 1; transform: scale(1.05) translateY(-4px); }
100% { }
}

@-webkit-keyframes pop-right {
0% { opacity: 0.8; -webkit-transform: scale(0.9) translateX(-14px); }
50% { opacity: 1; -webkit-transform: scale(1.05) translateX(4px); }
100% { }
}
@keyframes pop-right {
0% { opacity: 0.8; transform: scale(0.9) translateX(-14px); }
50% { opacity: 1; transform: scale(1.05) translateX(4px); }
100% { }
}
2 changes: 1 addition & 1 deletion src/css/editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.ck-editor {
font-family: Georgia, serif;
margin: 1em 0;
color: #333;
color: #454545;
/*
Chrome bug adds inline styles when backspacing to join 2 blocks.
Fix: Apply font styles to parent element, or use % for font-size, line-height.
Expand Down
4 changes: 2 additions & 2 deletions src/css/embeds.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
line-height: 0.7em;
cursor: pointer;
transition: color @colorChangeSpeed, border-color @colorChangeSpeed, transform 0.35s;
-webkit-animation: pop 0.25s;
animation: pop 0.25s;
-webkit-animation: pop-out 0.25s;
animation: pop-out 0.25s;
}
.ck-embed-intent-btn:hover {
color: #999;
Expand Down
43 changes: 25 additions & 18 deletions src/css/toolbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,48 @@
background: -ms-linear-gradient(top, rgba(74,74,74,0.97) 0%,rgba(43,43,43,1) 100%);
background: linear-gradient(to bottom, rgba(74,74,74,0.97) 0%,rgba(43,43,43,1) 100%);
box-shadow: 0 1px 3px -1px rgba(0,0,0,0.8), inset 0 2px 0 rgba(255,255,255,0.12), inset 1px 1px 0 #282828, inset -1px -1px 0 #282828;
border-radius: 5px;
border-radius: 3px;
transition: left @elementMoveSpeed, top @elementMoveSpeed;
margin-bottom: 0.6em; /* space for arrow */
margin-bottom: 0.45em; // space for arrow
}

// arrow
.ck-toolbar:after {
content: '';
position: absolute;
left: 50%;
width: 0;
height: 0;
border-left: 0.5em solid transparent;
border-right: 0.5em solid transparent;
border-top: 0.5em solid rgba(43,43,43,1);
bottom: -0.45em;
margin: 0 0 0 -0.5em;
border-left: 0.45em solid transparent;
border-right: 0.45em solid transparent;
border-top: 0.45em solid rgba(43,43,43,1);
bottom: -0.4em;
margin: 0 0 0 -0.45em;
}

.ck-toolbar.right {
margin: 0 0 0 0.5em;
}
.ck-toolbar.right:after {
left: -0.95em;
left: -0.4em;
top: 50%;
bottom: auto;
margin: -0.5em 0 0 0;
border-top: 0.5em solid transparent;
border-bottom: 0.5em solid transparent;
border-right: 0.5em solid #393939;
margin: -0.45em 0 0 0;
border-top: 0.45em solid transparent;
border-bottom: 0.45em solid transparent;
border-right: 0.45em solid #3d3d3d;
border-left: none;
}

.ck-toolbar,
.ck-toolbar-prompt {
-webkit-animation: pop 0.25s;
animation: pop 0.25s;
-webkit-animation: pop-up 0.25s;
animation: pop-up 0.25s;
}
.ck-toolbar.right,
.ck-toolbar.right .ck-toolbar-prompt {
-webkit-animation: pop-right 0.25s;
animation: pop-right 0.25s;
}

.ck-toolbar-buttons {
Expand All @@ -68,17 +75,17 @@
height: 44px;
line-height: 42px;
cursor: pointer;
transition: background-color @colorChangeSpeed;
text-shadow: 0 1px rgba(0,0,0,0.7);
transition: background-color @colorChangeSpeed linear;
text-shadow: 0 1px 1px rgba(0,0,0,0.65);
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
.ck-toolbar-btn:hover {
background-color: rgba(43,43,43,0.5);
background-color: rgba(43,43,43,0.4);
}
.ck-toolbar-btn:active {
background-color: rgba(43,43,43,0.75);
background-color: rgba(43,43,43,0.65);
}
.ck-toolbar-btn:active,
.ck-toolbar-btn.active {
Expand Down
2 changes: 1 addition & 1 deletion src/css/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
@themeColorText : darken(@themeColor, 10%);

@elementMoveSpeed : 0.1s;
@colorChangeSpeed : 0.15s;
@colorChangeSpeed : 0.1s;

0 comments on commit 7752de9

Please sign in to comment.