From 2cdd9fef70fa0bf398e9f78711ab52f0e79a6363 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 00:47:41 +0200 Subject: [PATCH 01/11] Use font shorthand for ace_editor --- lib/ace/css/editor.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index 35cdf57f..ff83878c 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -1,9 +1,7 @@ .ace_editor { position: relative; overflow: hidden; - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; - font-size: 12px; - line-height: normal; + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; direction: ltr; } From a89e3d0d9dcd316f83bb7dd48f1e7c5a942a2066 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 00:53:25 +0200 Subject: [PATCH 02/11] Only -webkit prefix for transitions is necessary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Android and iOS safari both support it without the prefix, but hasn’t for long --- lib/ace/css/editor.css | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index ff83878c..556cbbb6 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -218,10 +218,7 @@ } .ace_smooth-blinking .ace_cursor { - -moz-transition: opacity 0.18s; -webkit-transition: opacity 0.18s; - -o-transition: opacity 0.18s; - -ms-transition: opacity 0.18s; transition: opacity 0.18s; } @@ -397,19 +394,13 @@ } .ace_fade-fold-widgets .ace_fold-widget { - -moz-transition: opacity 0.4s ease 0.05s; -webkit-transition: opacity 0.4s ease 0.05s; - -o-transition: opacity 0.4s ease 0.05s; - -ms-transition: opacity 0.4s ease 0.05s; transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { - -moz-transition: opacity 0.05s ease 0.05s; -webkit-transition: opacity 0.05s ease 0.05s; - -o-transition: opacity 0.05s ease 0.05s; - -ms-transition: opacity 0.05s ease 0.05s; transition: opacity 0.05s ease 0.05s; opacity:1; } From f4afa89d4ea7445bc778777cf18326c1bc5b0e09 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 00:55:33 +0200 Subject: [PATCH 03/11] Vendor prefixes aren't necessary for box-shadow --- lib/ace/css/editor.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index 556cbbb6..9d5bab89 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -354,16 +354,12 @@ .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); - -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); - -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); - -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } /** @@ -383,8 +379,6 @@ background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { - -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); - -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } From f103d2632cc50ed7d678302800b70b80823cc772 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 09:06:33 +0200 Subject: [PATCH 04/11] px is redundant for zero values --- lib/ace/css/editor.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index 9d5bab89..322a97d0 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -209,7 +209,7 @@ } .ace_overwrite-cursors .ace_cursor { - border-left-width: 0px; + border-left-width: 0; border-bottom: 1px solid; } From a36e7bb0c18cb0143a3662896cfe05d11db8185f Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 09:11:32 +0200 Subject: [PATCH 05/11] position: fixed triggers display: block --- lib/ace/css/editor.css | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index 322a97d0..b9d94407 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -297,7 +297,6 @@ border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; - display: block; max-width: 100%; padding: 3px 4px; position: fixed; From 6a0a108d2a2d14c802106946af078be3f90a8034 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 09:11:54 +0200 Subject: [PATCH 06/11] Vendor prefixes are not needed for border-radius --- lib/ace/css/editor.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index b9d94407..9e2db39a 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -272,8 +272,6 @@ color: transparent; border: 1px solid black; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; border-radius: 2px; cursor: pointer; From eabb4b2cb5c4e76c7ee0ece2dd22adfcc896d521 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 10:17:55 +0200 Subject: [PATCH 07/11] float triggers display: block --- lib/ace/ext/searchbox.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/ace/ext/searchbox.css b/lib/ace/ext/searchbox.css index 98b54257..90fb80dd 100644 --- a/lib/ace/ext/searchbox.css +++ b/lib/ace/ext/searchbox.css @@ -47,7 +47,6 @@ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - display: block; float: left; height: 22px; outline: 0; @@ -61,7 +60,6 @@ border: 0 none; border-left: 1px solid #dcdcdc; cursor: pointer; - display: block; float: left; height: 22px; margin: 0; @@ -94,7 +92,6 @@ border: 0 none; color: #656565; cursor: pointer; - display: block; float: right; font-family: Arial; font-size: 16px; From 87dcd881e39064dd7910f6fee060aaae936dd20d Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 10:18:23 +0200 Subject: [PATCH 08/11] Use font shorthand --- lib/ace/ext/searchbox.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ace/ext/searchbox.css b/lib/ace/ext/searchbox.css index 90fb80dd..ca58e74d 100644 --- a/lib/ace/ext/searchbox.css +++ b/lib/ace/ext/searchbox.css @@ -93,10 +93,8 @@ color: #656565; cursor: pointer; float: right; - font-family: Arial; - font-size: 16px; + font: 16px/16px Arial; height: 14px; - line-height: 16px; margin: 5px 1px 9px 5px; padding: 0; text-align: center; From 6593e25de6fa5685bc0a7e88d685212958d573b8 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 10:25:52 +0200 Subject: [PATCH 09/11] Keyframes can share values --- demo/kitchen-sink/docs/css.css | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/demo/kitchen-sink/docs/css.css b/demo/kitchen-sink/docs/css.css index 0ebe5f2d..7856a06f 100644 --- a/demo/kitchen-sink/docs/css.css +++ b/demo/kitchen-sink/docs/css.css @@ -13,16 +13,11 @@ } @keyframes blink { - 0% { + 0%, 40% { opacity: 0; } - 40% { - opacity: 0; - } - 40.5% { - opacity: 1 - } - 100% { + + 40.5%, 100% { opacity: 1 } } \ No newline at end of file From bde7daaf1b70065aef81f3bcc9377ed3a699e936 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 10:26:13 +0200 Subject: [PATCH 10/11] Use animation and font shorthand --- demo/kitchen-sink/docs/css.css | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/demo/kitchen-sink/docs/css.css b/demo/kitchen-sink/docs/css.css index 7856a06f..6d2d71f5 100644 --- a/demo/kitchen-sink/docs/css.css +++ b/demo/kitchen-sink/docs/css.css @@ -1,15 +1,10 @@ .text-layer { - font-family: Monaco, "Courier New", monospace; - font-size: 12pX; + font: 12px Monaco, "Courier New", monospace; cursor: text; } .blinker { - animation-duration: 1s; - animation-name: blink; - animation-iteration-count: infinite; - animation-direction: alternate; - animation-timing-function: linear; + animation: blink 1s linear infinite alternate; } @keyframes blink { From ec3750edcb6cc63b507987290ac16b6e4501cf17 Mon Sep 17 00:00:00 2001 From: Tobias Ahlin Date: Thu, 11 Sep 2014 10:26:49 +0200 Subject: [PATCH 11/11] float triggers display block --- lib/ace/ext/static.css | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ace/ext/static.css b/lib/ace/ext/static.css index f82359da..cc7da8a6 100644 --- a/lib/ace/ext/static.css +++ b/lib/ace/ext/static.css @@ -5,7 +5,6 @@ .ace_static_highlight .ace_gutter { width: 25px !important; - display: block; float: left; text-align: right; padding: 0 3px 0 0;