Better organize CSS properties by type
This commit is contained in:
		
							parent
							
								
									8dd5f9e718
								
							
						
					
					
						commit
						57e8579a17
					
				
					 7 changed files with 124 additions and 65 deletions
				
			
		|  | @ -1,9 +1,22 @@ | ||||||
|  | /* | ||||||
|  | Organization: | ||||||
|  | { | ||||||
|  |     display and alignment | ||||||
|  |     bounding box (width, margin, overflow, ...) | ||||||
|  |     borders and shadows | ||||||
|  |     backgrounds | ||||||
|  |     foregrounds | ||||||
|  |     misc | ||||||
|  | } | ||||||
|  | */ | ||||||
| body | body | ||||||
| { | { | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     background-color:#00d8f4; | 
 | ||||||
|     margin: 8px; |     margin: 8px; | ||||||
|  | 
 | ||||||
|  |     background-color:#00d8f4; | ||||||
| } | } | ||||||
| li | li | ||||||
| { | { | ||||||
|  | @ -15,13 +28,15 @@ li | ||||||
|     flex-direction: row; |     flex-direction: row; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     align-content: center; |     align-content: center; | ||||||
|  | 
 | ||||||
|     margin-bottom: 4px; |     margin-bottom: 4px; | ||||||
| } | } | ||||||
| .header_element | .header_element | ||||||
| { | { | ||||||
|     display: flex; |     display: flex; | ||||||
|     justify-content: center; |  | ||||||
|     flex: 1; |     flex: 1; | ||||||
|  |     justify-content: center; | ||||||
|  | 
 | ||||||
|     background-color: rgba(0, 0, 0, 0.1);    |     background-color: rgba(0, 0, 0, 0.1);    | ||||||
| } | } | ||||||
| .header_element:hover | .header_element:hover | ||||||
|  | @ -30,8 +45,8 @@ li | ||||||
| } | } | ||||||
| #content_body | #content_body | ||||||
| { | { | ||||||
|     flex: 0 0 auto; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 0 0 auto; | ||||||
|     flex-direction: row; |     flex-direction: row; | ||||||
| } | } | ||||||
| .add_tag_button, #search_go_button | .add_tag_button, #search_go_button | ||||||
|  | @ -54,15 +69,18 @@ li | ||||||
| { | { | ||||||
|     /*position: absolute;*/ |     /*position: absolute;*/ | ||||||
|     top: 3px; |     top: 3px; | ||||||
|  |     vertical-align: middle; | ||||||
|  | 
 | ||||||
|     width:  18px; |     width:  18px; | ||||||
|     height: 14px; |     height: 14px; | ||||||
|     padding: 0; |     padding: 0; | ||||||
|     vertical-align: middle; | 
 | ||||||
|     background-color: #ff4949; |  | ||||||
|     border-top: 2px solid #ffacac; |     border-top: 2px solid #ffacac; | ||||||
|     border-left: 2px solid #ffacac; |     border-left: 2px solid #ffacac; | ||||||
|     border-right: 2px solid #bd1b1b; |     border-right: 2px solid #bd1b1b; | ||||||
|     border-bottom: 2px solid #bd1b1b; |     border-bottom: 2px solid #bd1b1b; | ||||||
|  | 
 | ||||||
|  |     background-color: #ff4949; | ||||||
| } | } | ||||||
| .remove_tag_button | .remove_tag_button | ||||||
| { | { | ||||||
|  | @ -84,27 +102,31 @@ li | ||||||
| } | } | ||||||
| .photo_card_list | .photo_card_list | ||||||
| { | { | ||||||
|     background-color: #ffffd4; |  | ||||||
|     display: block; |  | ||||||
|     padding: 4px; |  | ||||||
|     margin: 8px; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: row; |     flex-direction: row; | ||||||
|     justify-content: space-between; |     justify-content: space-between; | ||||||
|  | 
 | ||||||
|  |     margin: 8px; | ||||||
|  |     padding: 4px; | ||||||
|  | 
 | ||||||
|  |     background-color: #ffffd4; | ||||||
| } | } | ||||||
| .photo_card_grid | .photo_card_grid | ||||||
| { | { | ||||||
|     display: inline-flex; |     display: inline-flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25); |     vertical-align: middle; | ||||||
|  | 
 | ||||||
|     min-width: 150px; |     min-width: 150px; | ||||||
|     max-width: 300px; |     max-width: 300px; | ||||||
|     height: 200px; |     height: 200px; | ||||||
|     background-color: #ffffd4; |  | ||||||
|     padding: 8px; |     padding: 8px; | ||||||
|     margin: 8px; |     margin: 8px; | ||||||
|  | 
 | ||||||
|     border-radius: 8px; |     border-radius: 8px; | ||||||
|     vertical-align: middle; |     box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25); | ||||||
|  | 
 | ||||||
|  |     background-color: #ffffd4; | ||||||
| } | } | ||||||
| .photo_card_grid_thumb | .photo_card_grid_thumb | ||||||
| { | { | ||||||
|  | @ -138,27 +160,32 @@ li | ||||||
|     flex: 1; |     flex: 1; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content: space-between; |     justify-content: space-between; | ||||||
|     font-size: 12.8px; | 
 | ||||||
|     background-color: inherit; |     background-color: inherit; | ||||||
|  | 
 | ||||||
|  |     font-size: 12.8px; | ||||||
| } | } | ||||||
| .photo_card_grid_filename | .photo_card_grid_filename | ||||||
| { | { | ||||||
|     background-color: inherit; |  | ||||||
|     max-height: 30px; |  | ||||||
|     overflow: hidden; |  | ||||||
|     align-self: flex-start; |     align-self: flex-start; | ||||||
|     word-break:break-word; |  | ||||||
|     z-index: 1; |  | ||||||
| 
 | 
 | ||||||
|     /* |     /* | ||||||
|     The width of photo cards should be based on the aspect ratio of the |     The width of photo cards should be based on the aspect ratio of the | ||||||
|     thumbnail image. Previously, I had problems where the card would be wider |     thumbnail image. Previously, I had problems where the card would be wider | ||||||
|     than necessary because the file had a long name. |     than necessary because the file had a long name. | ||||||
|     These min-width:100% + width:0 prevent the info div from controlling |     These min-width:100% + width:0 prevent the info div from controlling | ||||||
|     card size, prioritizing the thumbnail. |     card size, so we can prioritize the thumbnail instead. | ||||||
|     */ |     */ | ||||||
|     min-width: 100%; |     min-width: 100%; | ||||||
|     width: 0; |     width: 0; | ||||||
|  |     overflow: hidden; | ||||||
|  |     z-index: 1; | ||||||
|  | 
 | ||||||
|  |     max-height: 30px; | ||||||
|  | 
 | ||||||
|  |     background-color: inherit; | ||||||
|  | 
 | ||||||
|  |     word-break:break-word; | ||||||
| } | } | ||||||
| .photo_card_grid_filename a | .photo_card_grid_filename a | ||||||
| { | { | ||||||
|  | @ -170,11 +197,12 @@ li | ||||||
| } | } | ||||||
| .photo_card_grid_file_metadata | .photo_card_grid_file_metadata | ||||||
| { | { | ||||||
|  |     display: flex; | ||||||
|  |     z-index: 0; | ||||||
|  |     justify-content: space-between; | ||||||
|  | 
 | ||||||
|     font-family: monospace; |     font-family: monospace; | ||||||
|     font-size: 11px; |     font-size: 11px; | ||||||
|     display: flex; |  | ||||||
|     justify-content: space-between; |  | ||||||
|     z-index: 0; |  | ||||||
| } | } | ||||||
| .photo_card_grid_tags | .photo_card_grid_tags | ||||||
| { | { | ||||||
|  | @ -187,29 +215,34 @@ li | ||||||
| } | } | ||||||
| .tag_object | .tag_object | ||||||
| { | { | ||||||
|     font-size: 0.9em; |  | ||||||
|     background-color: #fff; |  | ||||||
|     border-radius: 2px; |     border-radius: 2px; | ||||||
|  | 
 | ||||||
|  |     background-color: #fff; | ||||||
|  | 
 | ||||||
|  |     font-size: 0.9em; | ||||||
|     text-decoration: none; |     text-decoration: none; | ||||||
|     font-family: monospace; |     font-family: monospace; | ||||||
|     line-height: 1.3; |     line-height: 1.3; | ||||||
| } | } | ||||||
| #message_area | #message_area | ||||||
| { | { | ||||||
|     overflow-y: auto; |  | ||||||
|     background-color: rgba(0, 0, 0, 0.1); |  | ||||||
|     width: 100%; |  | ||||||
|     height: 100%; |  | ||||||
|     max-height: 300px; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 2; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|     flex: 2; | 
 | ||||||
|  |     max-height: 300px; | ||||||
|  |     width: 100%; | ||||||
|  |     height: 100%; | ||||||
|  |     overflow-y: auto; | ||||||
|  | 
 | ||||||
|  |     background-color: rgba(0, 0, 0, 0.1); | ||||||
| } | } | ||||||
| .message_bubble | .message_bubble | ||||||
| { | { | ||||||
|     width: 80%; |     width: 80%; | ||||||
|     margin: 4px; |     margin: 4px; | ||||||
|  | 
 | ||||||
|     word-wrap: break-word; |     word-wrap: break-word; | ||||||
| } | } | ||||||
| .message_positive | .message_positive | ||||||
|  |  | ||||||
|  | @ -16,15 +16,18 @@ | ||||||
| } | } | ||||||
| .bookmark_card | .bookmark_card | ||||||
| { | { | ||||||
|     background-color: #ffffd4; |  | ||||||
|     display: inline-flex; |     display: inline-flex; | ||||||
|     flex: 0 0 auto; |     flex: 0 0 auto; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|  |     align-items: baseline; | ||||||
|  | 
 | ||||||
|     padding: 8px; |     padding: 8px; | ||||||
|     margin: 8px; |     margin: 8px; | ||||||
|     align-items: baseline; | 
 | ||||||
|     border-radius: 8px; |     border-radius: 8px; | ||||||
|     box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25); |     box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25); | ||||||
|  | 
 | ||||||
|  |     background-color: #ffffd4; | ||||||
| } | } | ||||||
| .bookmark_card .bookmark_url | .bookmark_card .bookmark_url | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -20,10 +20,11 @@ button | ||||||
| #content_body | #content_body | ||||||
| { | { | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 1; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|     flex: 1; | 
 | ||||||
|     max-width: 900px; |     max-width: 900px; | ||||||
|     margin-left: auto; |     margin-left: auto; | ||||||
|     margin-right: auto; |     margin-right: auto; | ||||||
|  | @ -38,12 +39,14 @@ button | ||||||
| #login_form, | #login_form, | ||||||
| #register_form | #register_form | ||||||
| { | { | ||||||
|     padding: 10px; |  | ||||||
|     border-radius: 5px; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     border: 1px solid black; | 
 | ||||||
|  |     padding: 10px; | ||||||
|     margin: 10px; |     margin: 10px; | ||||||
|  | 
 | ||||||
|  |     border-radius: 5px; | ||||||
|  |     border: 1px solid black; | ||||||
| } | } | ||||||
| #login_form > *, | #login_form > *, | ||||||
| #register_form > * | #register_form > * | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ | ||||||
| #content_body | #content_body | ||||||
| { | { | ||||||
|     /* Override common.css */ |     /* Override common.css */ | ||||||
|     flex-direction: row; |  | ||||||
|     flex: 1; |     flex: 1; | ||||||
|  |     flex-direction: row; | ||||||
| } | } | ||||||
| #left | #left | ||||||
| { | { | ||||||
|  | @ -23,14 +23,16 @@ | ||||||
| } | } | ||||||
| #right | #right | ||||||
| { | { | ||||||
|     flex: 1; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 1; | ||||||
| } | } | ||||||
| #editor_holder | #editor_holder | ||||||
| { | { | ||||||
|  |     flex-direction: column; | ||||||
|  | 
 | ||||||
|     max-width: 300px; |     max-width: 300px; | ||||||
|     padding: 8px; |     padding: 8px; | ||||||
|     flex-direction: column; | 
 | ||||||
|     background-color: rgba(0, 0, 0, 0.1); |     background-color: rgba(0, 0, 0, 0.1); | ||||||
| } | } | ||||||
| #editor_area | #editor_area | ||||||
|  | @ -58,11 +60,13 @@ | ||||||
| } | } | ||||||
| #photo_img_holder | #photo_img_holder | ||||||
| { | { | ||||||
|     height: 100%; |  | ||||||
|     width: 100%; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|  | 
 | ||||||
|  |     height: 100%; | ||||||
|  |     width: 100%; | ||||||
|  | 
 | ||||||
|     background-repeat: no-repeat; |     background-repeat: no-repeat; | ||||||
| } | } | ||||||
| #photo_img_holder img | #photo_img_holder img | ||||||
|  |  | ||||||
|  | @ -15,8 +15,8 @@ body, .nice_link | ||||||
| } | } | ||||||
| .nice_link, .plain_link | .nice_link, .plain_link | ||||||
| { | { | ||||||
|     margin: 8px; |  | ||||||
|     height: 40px; |     height: 40px; | ||||||
|  |     margin: 8px; | ||||||
| } | } | ||||||
| .nice_link | .nice_link | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -11,10 +11,11 @@ | ||||||
| <style> | <style> | ||||||
| form | form | ||||||
| { | { | ||||||
|     width: 100%; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|  | 
 | ||||||
|  |     width: 100%; | ||||||
| } | } | ||||||
| #error_message_area | #error_message_area | ||||||
| { | { | ||||||
|  | @ -26,9 +27,12 @@ form | ||||||
| .search_warning | .search_warning | ||||||
| { | { | ||||||
|     align-self: center; |     align-self: center; | ||||||
|     color: #fff; | 
 | ||||||
|     background-color: #f00; |  | ||||||
|     padding: 2px; |     padding: 2px; | ||||||
|  | 
 | ||||||
|  |     background-color: #f00; | ||||||
|  | 
 | ||||||
|  |     color: #fff; | ||||||
| } | } | ||||||
| #left, #right | #left, #right | ||||||
| { | { | ||||||
|  | @ -37,18 +41,23 @@ form | ||||||
| } | } | ||||||
| #left | #left | ||||||
| { | { | ||||||
|     background-color: rgba(0, 0, 0, 0.1); |     flex: 1; | ||||||
|     width: 300px; | 
 | ||||||
|  |     padding: 8px; | ||||||
|     max-width: 300px; |     max-width: 300px; | ||||||
|     min-width: 300px; |     min-width: 300px; | ||||||
|     padding: 8px; |     width: 300px; | ||||||
|     flex: 1; | 
 | ||||||
|  |     background-color: rgba(0, 0, 0, 0.1); | ||||||
|  | 
 | ||||||
|     word-wrap: break-word; |     word-wrap: break-word; | ||||||
| } | } | ||||||
| #right | #right | ||||||
| { | { | ||||||
|     flex: 1; |     flex: 1; | ||||||
|  | 
 | ||||||
|     padding: 8px; |     padding: 8px; | ||||||
|  | 
 | ||||||
|     width: auto; |     width: auto; | ||||||
| } | } | ||||||
| @media screen and (max-width: 800px) { | @media screen and (max-width: 800px) { | ||||||
|  | @ -77,12 +86,15 @@ form | ||||||
| } | } | ||||||
| .prev_page, .next_page | .prev_page, .next_page | ||||||
| { | { | ||||||
|     flex: 1; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 1; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     background-color: #ffffd4; | 
 | ||||||
|     font-size: 20; |  | ||||||
|     border: 1px solid black; |     border: 1px solid black; | ||||||
|  | 
 | ||||||
|  |     background-color: #ffffd4; | ||||||
|  | 
 | ||||||
|  |     font-size: 20; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .search_builder_tagger, | .search_builder_tagger, | ||||||
|  |  | ||||||
|  | @ -23,37 +23,41 @@ body | ||||||
| } | } | ||||||
| #right | #right | ||||||
| { | { | ||||||
|     background-color: rgba(0, 0, 0, 0.1); |  | ||||||
|     width: 300px; |  | ||||||
|     position: fixed; |  | ||||||
|     right: 8px; |  | ||||||
|     bottom: 8px; |  | ||||||
|     top: 30px; |  | ||||||
|     padding: 8px; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|  |     position: fixed; | ||||||
|  |     right: 8px; | ||||||
|  |     bottom: 8px; | ||||||
|  |     top: 30px; | ||||||
|  | 
 | ||||||
|  |     width: 300px; | ||||||
|  |     padding: 8px; | ||||||
|  | 
 | ||||||
|  |     background-color: rgba(0, 0, 0, 0.1); | ||||||
| } | } | ||||||
| #editor_area | #editor_area | ||||||
| { | { | ||||||
|     flex: 1; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 1; | ||||||
|     flex-direction: row; |     flex-direction: row; | ||||||
|     justify-content center; |     justify-content center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
| } | } | ||||||
| #message_area | #message_area | ||||||
| { | { | ||||||
|     overflow-y: auto; |  | ||||||
|     background-color: rgba(0, 0, 0, 0.1); |  | ||||||
|     width: 100%; |  | ||||||
|     height: 100%; |  | ||||||
|     flex: 2; |  | ||||||
|     display: flex; |     display: flex; | ||||||
|  |     flex: 2; | ||||||
|     flex-direction: column; |     flex-direction: column; | ||||||
|     justify-content center; |     justify-content center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|  | 
 | ||||||
|  |     width: 100%; | ||||||
|  |     height: 100%; | ||||||
|  |     overflow-y: auto; | ||||||
|  | 
 | ||||||
|  |     background-color: rgba(0, 0, 0, 0.1); | ||||||
| } | } | ||||||
| </style> | </style> | ||||||
| </head> | </head> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue