Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/browser/resources/file_manager/css/file_manager.css

Issue 15946005: Files.app: Fit the size of search box as its contents size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 4
5 html { 5 html {
6 height: 100%; 6 height: 100%;
7 } 7 }
8 8
9 html.col-resize * { 9 html.col-resize * {
10 cursor: col-resize !important; 10 cursor: col-resize !important;
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 margin-top: 7px; 510 margin-top: 7px;
511 } 511 }
512 512
513 body[new-ui] .dialog-header { 513 body[new-ui] .dialog-header {
514 -webkit-app-region: drag; 514 -webkit-app-region: drag;
515 height: 48px; 515 height: 48px;
516 margin: 0; 516 margin: 0;
517 } 517 }
518 518
519 body[new-ui] .search-box-wrapper { 519 body[new-ui] .search-box-wrapper {
520 -webkit-align-items: center;
520 -webkit-box-flex: 1; 521 -webkit-box-flex: 1;
521 display: -webkit-box; 522 display: -webkit-flex;
522 height: 100%; 523 height: 100%;
523 } 524 }
524 525
525 body[new-ui] .dialog-header #search-box, 526 body[new-ui] .dialog-header #search-box,
526 body[new-ui] .dialog-header #autocomplete-list, 527 body[new-ui] .dialog-header #autocomplete-list,
528 body[new-ui] .dialog-header #search-icon,
529 body[new-ui] .dialog-header #search-clear-button,
527 body[new-ui] .dialog-header .buttonbar button { 530 body[new-ui] .dialog-header .buttonbar button {
528 -webkit-app-region: no-drag; 531 -webkit-app-region: no-drag;
529 } 532 }
530 533
531 body[new-ui] .dialog-header #autocomplete-list {
532 max-width: 240px;
533 }
534
535 body[new-ui] .dialog-header #gear-button { 534 body[new-ui] .dialog-header #gear-button {
536 background-image: -webkit-image-set( 535 background-image: -webkit-image-set(
537 url('../images/files/ui/new-ui/topbar_button_settings.png') 1x, 536 url('../images/files/ui/new-ui/topbar_button_settings.png') 1x,
538 url('../images/files/ui/new-ui/2x/topbar_button_settings.png') 2x); 537 url('../images/files/ui/new-ui/2x/topbar_button_settings.png') 2x);
539 } 538 }
540 539
541 body[new-ui] .dialog-header #maximize-button { 540 body[new-ui] .dialog-header #maximize-button {
542 background-image: -webkit-image-set( 541 background-image: -webkit-image-set(
543 url('../images/files/ui/new-ui/topbar_button_maximize.png') 1x, 542 url('../images/files/ui/new-ui/topbar_button_maximize.png') 1x,
544 url('../images/files/ui/new-ui/2x/topbar_button_maximize.png') 2x); 543 url('../images/files/ui/new-ui/2x/topbar_button_maximize.png') 2x);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 transition: max-width 200ms; 801 transition: max-width 200ms;
803 width: 100%; 802 width: 100%;
804 } 803 }
805 804
806 #search-box[hidden] { 805 #search-box[hidden] {
807 display: none; /* Required, since overriden by #search-box. */ 806 display: none; /* Required, since overriden by #search-box. */
808 } 807 }
809 808
810 body[new-ui] #search-box { 809 body[new-ui] #search-box {
811 -webkit-margin-end: 0; 810 -webkit-margin-end: 0;
812 -webkit-padding-after: 0; 811 background-image: none;
813 -webkit-padding-before: 0;
814 -webkit-padding-end: 52px;
815 -webkit-padding-start: 46px;
816 background: -webkit-image-set(
817 url('../images/files/ui/new-ui/search_icon_inactive.png') 1x,
818 url('../images/files/ui/new-ui/2x/search_icon_inactive.png') 2x);
819 background-position: 13px center;
820 background-repeat: no-repeat;
821 border-style: none; 812 border-style: none;
822 display: block; 813 display: block;
823 height: 48px; 814 height: 48px;
824 line-height: 1em; 815 line-height: 1em;
825 max-width: none; 816 max-width: 100%;
817 outline: none;
818 padding: 0;
819 pointer-events: none;
826 position: relative; 820 position: relative;
827 transition: width 0; 821 transition: width 0;
828 width: 58px; 822 width: 0; /* Overrided by script */
829 } 823 }
830 824
831 html[dir='rtl'] #search-box { 825 body[new-ui] #search-box:focus,
826 body[new-ui] #search-box:active,
827 body[new-ui] .has-text #search-box {
828 pointer-events: auto;
829 }
830
831 html[dir='rtl'] body:not([new-ui]) #search-box {
832 background-position: right 4px top 5.5px; 832 background-position: right 4px top 5.5px;
833 } 833 }
834 834
835 html[dir='rtl'] body[new-ui] #search-box { 835 body:not([new-ui]) #search-box:hover {
836 background-position: right 13px center;
837 }
838
839 #search-box:hover {
840 border: 1px solid #b9b9b9; 836 border: 1px solid #b9b9b9;
841 border-top: 1px solid #a0a0a0; 837 border-top: 1px solid #a0a0a0;
842 box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); 838 box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
843 } 839 }
844 840
845 #search-box:focus { 841 body:not([new-ui]) #search-box:focus {
846 border: 1px solid rgb(77, 144, 254); 842 border: 1px solid rgb(77, 144, 254);
847 box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); 843 box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
848 max-width: 240px; 844 max-width: 240px;
849 outline: none; 845 outline: none;
850 width: 100%; 846 width: 100%;
851 } 847 }
852 848
853 body[new-ui] #search-box.has-text,
854 body[new-ui] #search-box:focus {
855 max-width: none;
856 width: 100%;
857 }
858
859 body[new-ui] #search-box:hover,
860 body[new-ui] #search-box:focus {
861 background: -webkit-image-set(
862 url('../images/files/ui/new-ui/search_icon_active.png') 1x,
863 url('../images/files/ui/new-ui/2x/search_icon_active.png') 2x);
864 background-position: 13px center;
865 background-repeat: no-repeat;
866 border-style: none;
867 box-shadow: none;
868 }
869
870 #search-box::-webkit-search-cancel-button { 849 #search-box::-webkit-search-cancel-button {
871 -webkit-appearance: none; 850 -webkit-appearance: none;
872 background-image: -webkit-image-set(
873 url('../images/files/ui/new-ui/search_clear.png') 1x,
874 url('../images/files/ui/new-ui/2x/search_clear.png') 2x);
875 height: 12px;
876 position: absolute;
877 top: 18px;
878 width: 12px;
879 } 851 }
880 852
881 body:not([new-ui]) #search-box::-webkit-search-cancel-button { 853 body:not([new-ui]) #search-box::-webkit-search-cancel-button {
882 background-image: -webkit-image-set( 854 background-image: -webkit-image-set(
883 url('../images/files/ui/search_clear.png') 1x, 855 url('../images/files/ui/search_clear.png') 1x,
884 url('../images/files/ui/2x/search_clear.png') 2x); 856 url('../images/files/ui/2x/search_clear.png') 2x);
885 height: 16px; 857 height: 16px;
858 position: absolute;
886 top: 6px; 859 top: 6px;
887 width: 16px; 860 width: 16px;
888 } 861 }
889 862
890 html:not([dir='rtl']) #search-box::-webkit-search-cancel-button {
891 right: 30px;
892 }
893
894 html[dir='rtl'] #search-box::-webkit-search-cancel-button {
895 left: 30px;
896 }
897
898 html[dir='rtl'] body:not([new-ui]) #search-box::-webkit-search-cancel-button {
899 left: 2px;
900 }
901
902 html:not([dir='rtl']) body:not([new-ui]) 863 html:not([dir='rtl']) body:not([new-ui])
903 #search-box::-webkit-search-cancel-button { 864 #search-box::-webkit-search-cancel-button {
904 right: 2px; 865 right: 2px;
905 } 866 }
906 867
907 #search-box::-webkit-search-cancel-button:hover { 868 html[dir='rtl'] body:not([new-ui]) #search-box::-webkit-search-cancel-button {
908 background-image: -webkit-image-set( 869 left: 2px;
909 url('../images/files/ui/new-ui/search_clear_hover.png') 1x,
910 url('../images/files/ui/new-ui/2x/search_clear_hover.png') 2x);
911 } 870 }
912 871
913 body:not([new-ui]) #search-box::-webkit-search-cancel-button:hover { 872 body:not([new-ui]) #search-box::-webkit-search-cancel-button:hover {
914 background-image: -webkit-image-set( 873 background-image: -webkit-image-set(
915 url('../images/files/ui/search_clear_hover.png') 1x, 874 url('../images/files/ui/search_clear_hover.png') 1x,
916 url('../images/files/ui/2x/search_clear_hover.png') 2x); 875 url('../images/files/ui/2x/search_clear_hover.png') 2x);
917 } 876 }
918 877
919 #search-box::-webkit-search-cancel-button:active {
920 background-image: -webkit-image-set(
921 url('../images/files/ui/new-ui/search_clear_pressed.png') 1x,
922 url('../images/files/ui/new-ui/2x/search_clear_pressed.png') 2x);
923 }
924
925 body:not([new-ui]) #search-box::-webkit-search-cancel-button:active { 878 body:not([new-ui]) #search-box::-webkit-search-cancel-button:active {
926 background-image: -webkit-image-set( 879 background-image: -webkit-image-set(
927 url('../images/files/ui/search_clear_pressed.png') 1x, 880 url('../images/files/ui/search_clear_pressed.png') 1x,
928 url('../images/files/ui/2x/search_clear_pressed.png') 2x); 881 url('../images/files/ui/2x/search_clear_pressed.png') 2x);
929 } 882 }
930 883
884 body[new-ui] #search-icon {
885 -webkit-flex-shrink: 0;
886 -webkit-margin-end: 3px;
887 -webkit-margin-start: 10px;
888 -webkit-order: -1;
889 background-image: -webkit-image-set(
890 url('../images/files/ui/new-ui/search_icon_inactive.png') 1x,
891 url('../images/files/ui/new-ui/2x/search_icon_inactive.png') 2x);
892 background-position: center;
893 background-repeat: no-repeat;
894 height: 32px;
895 width: 32px;
896 }
897
898 body[new-ui] #search-icon:hover,
899 body[new-ui] #search-box:active + #search-icon,
900 body[new-ui] #search-box:focus + #search-icon,
901 body[new-ui] .has-text #search-icon {
902 background: -webkit-image-set(
903 url('../images/files/ui/new-ui/search_icon_active.png') 1x,
904 url('../images/files/ui/new-ui/2x/search_icon_active.png') 2x);
905 }
906
907 body[new-ui] #search-clear-button {
908 -webkit-margin-end: 30px;
909 -webkit-margin-start: 10px;
910 background-image: -webkit-image-set(
911 url('../images/files/ui/new-ui/search_clear.png') 1x,
912 url('../images/files/ui/new-ui/2x/search_clear.png') 2x);
913 background-position: center;
914 background-repeat: no-repeat;
915 display: none;
916 height: 12px;
917 width: 12px;
918 }
919
920 body[new-ui] .search-box-wrapper.has-text + #search-clear-button {
921 display: block;
922 }
923
924 body[new-ui] #search-clear-button:hover {
925 background-image: -webkit-image-set(
926 url('../images/files/ui/new-ui/search_clear_hover.png') 1x,
927 url('../images/files/ui/new-ui/2x/search_clear_hover.png') 2x);
928 }
929
930 body[new-ui] #search-clear-button:active {
931 background-image: -webkit-image-set(
932 url('../images/files/ui/new-ui/search_clear_pressed.png') 1x,
933 url('../images/files/ui/new-ui/2x/search_clear_pressed.png') 2x);
934 }
935
931 body:not([new-ui]) button#detail-view::before { 936 body:not([new-ui]) button#detail-view::before {
932 background-image: -webkit-image-set( 937 background-image: -webkit-image-set(
933 url('../images/files/ui/view_list_black.png') 1x, 938 url('../images/files/ui/view_list_black.png') 1x,
934 url('../images/files/ui/2x/view_list_black.png') 2x); 939 url('../images/files/ui/2x/view_list_black.png') 2x);
935 } 940 }
936 941
937 body:not([new-ui]) button#thumbnail-view::before { 942 body:not([new-ui]) button#thumbnail-view::before {
938 background-image: -webkit-image-set( 943 background-image: -webkit-image-set(
939 url('../images/files/ui/view_thumbs_black.png') 1x, 944 url('../images/files/ui/view_thumbs_black.png') 1x,
940 url('../images/files/ui/2x/view_thumbs_black.png') 2x); 945 url('../images/files/ui/2x/view_thumbs_black.png') 2x);
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 background-color: white; 2246 background-color: white;
2242 border: 1px solid #aaa; 2247 border: 1px solid #aaa;
2243 border-radius: 2px; 2248 border-radius: 2px;
2244 box-sizing: border-box; /* To match the width with the search box's. */ 2249 box-sizing: border-box; /* To match the width with the search box's. */
2245 min-height: 0; 2250 min-height: 0;
2246 position: fixed; 2251 position: fixed;
2247 z-index: 3; 2252 z-index: 3;
2248 } 2253 }
2249 2254
2250 body[new-ui] list.autocomplete-suggestions { 2255 body[new-ui] list.autocomplete-suggestions {
2251 -webkit-margin-start: 10px; 2256 -webkit-margin-before: -7px;
2257 -webkit-margin-start: -38px;
2252 background-color: rgb(250, 250, 250); 2258 background-color: rgb(250, 250, 250);
2253 border: 1px solid rgb(255, 255, 255); 2259 border: 1px solid rgb(255, 255, 255);
2254 border-radius: 3px; 2260 border-radius: 3px;
2255 box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .5); 2261 box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .5);
2256 box-sizing: border-box; /* To match the width with the search box's. */ 2262 box-sizing: border-box; /* To match the width with the search box's. */
2257 color: rgb(34, 34, 34); 2263 color: rgb(34, 34, 34);
2258 overflow: hidden; 2264 overflow: hidden;
2259 padding: 5px 0; 2265 padding: 5px 0;
2260 position: fixed; 2266 position: fixed;
2267 width: 300px !important; /* This overrides the value specified by script. */
2261 z-index: 3; 2268 z-index: 3;
2262 } 2269 }
2263 2270
2264 list.autocomplete-suggestions > li { 2271 list.autocomplete-suggestions > li {
2265 -webkit-box-align: center; 2272 -webkit-box-align: center;
2266 border-radius: 0; 2273 border-radius: 0;
2267 display: -webkit-box; 2274 display: -webkit-box;
2268 margin: 0; /* To prevent vertical overflow. */ 2275 margin: 0; /* To prevent vertical overflow. */
2269 padding: 3px 0; 2276 padding: 3px 0;
2270 } 2277 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 body[new-ui] #iframe-drag-area { 2365 body[new-ui] #iframe-drag-area {
2359 -webkit-app-region: drag; 2366 -webkit-app-region: drag;
2360 height: 45px; 2367 height: 45px;
2361 left: 64px; 2368 left: 64px;
2362 position: absolute; 2369 position: absolute;
2363 right: 70px; 2370 right: 70px;
2364 top: 0; 2371 top: 0;
2365 width: auto; 2372 width: auto;
2366 z-index: 101; 2373 z-index: 101;
2367 } 2374 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698