Changeset 45605
- Timestamp:
- 07/07/2019 08:10:55 PM (5 years ago)
- Location:
- trunk/src/wp-content/themes/twentynineteen
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss
r45264 r45605 1 1 /* !Block styles */ 2 2 3 4 // Default block margin and alignment rules. 5 // These are replicated inside of the Group block 6 // so that child blocks in there appear the same way. 3 7 .entry .entry-content > *, 4 .entry .entry-summary > * { 8 .entry .entry-summary > *, 9 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 10 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5 11 margin: 32px 0; 6 12 max-width: 100%; … … 10 16 @include media(tablet) { 11 17 margin: 32px 0; 12 }13 14 > *:first-child {15 margin-top: 0;16 }17 18 > *:last-child {19 margin-bottom: 0;20 18 } 21 19 … … 89 87 margin-right: 0; 90 88 } 89 } 90 } 91 92 .entry .entry-content > *, 93 .entry .entry-summary > * { 94 95 > *:first-child { 96 margin-top: 0; 97 } 98 99 > *:last-child { 100 margin-bottom: 0; 91 101 } 92 102 } … … 511 521 img { 512 522 display: block; 523 } 524 525 // If an image does not have a left/center/right alignment, 526 // it's a direct child of .wp-block-img. If it has no other 527 // alignment added, we want to make sure the image does not 528 // extend beyond the width of the text column. 529 &:not(.alignwide):not(.alignfull) > img { 530 @include postContentMaxWidth(); 513 531 } 514 532 … … 753 771 } 754 772 773 // Ensure images do not expand beyond the column. 774 .wp-block-image > img:not(.alignwide):not(.alignfull) { 775 776 @include media(tablet) { 777 max-width: 100%; 778 } 779 780 @include media(desktop) { 781 max-width: 100%; 782 } 783 } 784 755 785 @include media(tablet) { 756 786 flex-wrap: nowrap; … … 760 790 } 761 791 } 792 } 793 794 //! Group 795 .wp-block-group { 796 797 // When the Group block is standard/wide, we need to prevent full-aligned 798 // child blocks from expanding out of their container. 799 &:not(.alignfull) > .wp-block-group__inner-container > .alignfull, 800 &:not(.alignfull) > .wp-block-group__inner-container > .wp-block-image > img { 801 802 @include media(tablet) { 803 left: 0; 804 max-width: 100%; 805 } 806 } 807 808 // The full-width Group block's inner container should mimic .entry-content styles. 809 &.alignfull > .wp-block-group__inner-container { 810 max-width: calc(100% - (2 * #{ $size__spacing-unit })); 811 margin: 0 $size__spacing-unit; 812 813 @include media(tablet) { 814 max-width: 80%; 815 margin: 0 10%; 816 padding: 0 60px; 817 } 818 } 819 820 // Group block with a colored background. 821 &.has-background { 822 padding: $size__spacing-unit; 823 margin-top: 0; 824 margin-bottom: 0; 825 826 // Remove the top and bottom margins of inner blocks. 827 .wp-block-group__inner-container { 828 829 > *:first-child { 830 margin-top: 0; 831 } 832 833 > *:last-child { 834 margin-bottom: 0; 835 } 836 } 837 838 // If the Group block is full-width, it does not need this extra padding. 839 &.alignfull { 840 padding-left: 0; 841 padding-right: 0; 842 843 @include media(tablet) { 844 padding-top: $size__spacing-unit; 845 padding-bottom: $size__spacing-unit; 846 } 847 } 848 849 // Full-aligned child blocks should take up the maximum width available in their container. 850 &:not(.alignfull) > .wp-block-group__inner-container > .alignfull { 851 width: 100%; 852 max-width: 100%; 853 854 @include media(tablet) { 855 width: calc( 100% + #{$size__spacing-unit * 2} ); 856 max-width: calc( 100% + #{$size__spacing-unit * 2} ); 857 margin-left: -#{$size__spacing-unit}; 858 } 859 } 860 } 861 762 862 } 763 863 -
trunk/src/wp-content/themes/twentynineteen/style-editor.css
r44739 r45605 1294 1294 color: #767676; 1295 1295 } 1296 1297 /** === Group Block === */ 1298 .wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 1299 left: 0; 1300 } 1301 1302 .wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group.has-background { 1303 padding: 22px; 1304 } 1305 1306 .wp-block[data-type="core/group"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 1307 margin-left: -22px; 1308 width: calc(100% + 44px); 1309 max-width: calc(100% + 44px); 1310 } 1311 1312 @media only screen and (min-width: 768px) { 1313 .wp-block[data-type="core/group"][data-align="wide"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 1314 width: calc(8 * (100vw / 12)); 1315 } 1316 } 1317 1318 @media only screen and (min-width: 1168px) { 1319 .wp-block[data-type="core/group"][data-align="wide"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 1320 width: calc(6 * (100vw / 12 )); 1321 } 1322 } 1323 1324 @media only screen and (min-width: 768px) { 1325 .wp-block[data-type="core/group"][data-align="wide"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 1326 width: calc(8 * (100vw / 12) - 44px); 1327 } 1328 } 1329 1330 @media only screen and (min-width: 1168px) { 1331 .wp-block[data-type="core/group"][data-align="wide"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 1332 width: calc(6 * (100vw / 12 ) - 44px); 1333 } 1334 } 1335 1336 @media only screen and (min-width: 600px) { 1337 .wp-block[data-type="core/group"][data-align="full"] { 1338 max-width: calc(100% + 89px); 1339 } 1340 } 1341 1342 @media only screen and (min-width: 768px) { 1343 .wp-block[data-type="core/group"][data-align="full"] { 1344 max-width: calc(125% + 114px); 1345 } 1346 } 1347 1348 @media only screen and (min-width: 600px) { 1349 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout { 1350 padding-left: 46px; 1351 padding-right: 46px; 1352 } 1353 } 1354 1355 @media only screen and (min-width: 768px) { 1356 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout { 1357 width: 80%; 1358 margin-left: 10%; 1359 margin-right: 10%; 1360 padding-left: 48px; 1361 padding-right: 48px; 1362 } 1363 } 1364 1365 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="full"]) { 1366 max-width: calc(100vw - (2 * 1rem)); 1367 } 1368 1369 @media only screen and (min-width: 768px) { 1370 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="full"]) { 1371 max-width: calc(8 * (100vw / 12)); 1372 } 1373 } 1374 1375 @media only screen and (min-width: 1168px) { 1376 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="full"]) { 1377 max-width: calc(6 * (100vw / 12)); 1378 } 1379 } 1380 1381 @media only screen and (min-width: 768px) { 1382 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="right"] { 1383 max-width: 125%; 1384 } 1385 } 1386 1387 @media only screen and (min-width: 768px) { 1388 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="wide"] { 1389 width: calc(100% + 4px); 1390 max-width: calc(100% + 4px); 1391 } 1392 } 1393 1394 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align=full] { 1395 max-width: calc(100vw + (2 * 1rem)); 1396 } 1397 1398 @media only screen and (min-width: 600px) { 1399 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align=full] { 1400 width: calc(100% + 92px); 1401 left: -46px; 1402 } 1403 } 1404 1405 @media only screen and (min-width: 768px) { 1406 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align=full] { 1407 left: calc(-12.5% - 58px); 1408 width: calc(125% + 120px); 1409 max-width: calc(125% + 119px); 1410 } 1411 } 1412 1413 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group.has-background { 1414 padding: 22px 0; 1415 } 1416 1417 @media only screen and (min-width: 600px) { 1418 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group.has-background { 1419 padding-left: 0; 1420 padding-right: 0; 1421 } 1422 } 1423 1424 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 1425 margin-left: 0; 1426 width: 100%; 1427 } 1428 1429 @media only screen and (min-width: 600px) { 1430 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 1431 width: calc(100% + 92px); 1432 } 1433 } 1434 1435 @media only screen and (min-width: 768px) { 1436 .wp-block[data-type="core/group"][data-align="full"] > .editor-block-list__block-edit > div > .wp-block-group.has-background > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 1437 width: calc(125% + 120px); 1438 } 1439 } -
trunk/src/wp-content/themes/twentynineteen/style-editor.scss
r44739 r45605 740 740 } 741 741 } 742 743 /** === Group Block === */ 744 745 // This matches the 22px value for 1rem that used on the front end. 746 // It must be specified in pixels for the editor, since the root font 747 // size is different here. 748 $group-block-background__padding: $font__size_base; 749 750 .wp-block[data-type="core/group"] { 751 752 // Group block base styles 753 > .editor-block-list__block-edit > div > .wp-block-group { 754 755 // Child: Full alignment 756 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 757 left: 0; 758 } 759 } 760 761 // Group block with background color 762 > .editor-block-list__block-edit > div > .wp-block-group.has-background { 763 padding: $group-block-background__padding; 764 765 // Child: Full alignment 766 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 767 margin-left: -$group-block-background__padding; 768 width: calc(100% + #{$group-block-background__padding * 2}); 769 max-width: calc(100% + #{$group-block-background__padding * 2}); 770 } 771 } 772 773 // Wide and full alignments 774 &[data-align="wide"] { 775 776 // Group block base styles. 777 > .editor-block-list__block-edit > div > .wp-block-group { 778 779 // Child blocks: Default alignments 780 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 781 @include media(tablet) { 782 width: calc(8 * (100vw / 12)); 783 } 784 785 @include media(desktop) { 786 width: calc(6 * (100vw / 12 )); 787 } 788 } 789 } 790 791 // Group block with background color 792 > .editor-block-list__block-edit > div > .wp-block-group.has-background { 793 794 // Child blocks: Default alignments 795 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block:not([data-align="wide"]):not([data-align="full"]) { 796 @include media(tablet) { 797 width: calc(8 * (100vw / 12) - #{$group-block-background__padding * 2}); 798 } 799 800 @include media(desktop) { 801 width: calc(6 * (100vw / 12 ) - #{$group-block-background__padding * 2}); 802 } 803 } 804 } 805 } 806 807 // Full alignment 808 &[data-align="full"] { 809 810 // Max-width needs to be a pixel narrower than usual to prevent horizontal scrolling. 811 @include media(mobile) { 812 max-width: calc(100% + 89px); 813 } 814 @include media(tablet) { 815 max-width: calc(125% + 114px); 816 } 817 818 // Group block base styles 819 > .editor-block-list__block-edit > div > .wp-block-group { 820 821 // Margins & padding are added to this container to mimic 822 // the style + spacing of the .editor-writing-flow global 823 // container. This way, child items sync up with the placement 824 // and size of other top-level blocks. 825 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout { 826 827 @include media(mobile) { 828 padding-left: 46px; 829 padding-right: 46px; 830 } 831 832 // 2px of extra padding are added to each side here 833 // To better match up with the spacing of the whole 834 // document. 835 @include media(tablet) { 836 width: 80%; 837 margin-left: 10%; 838 margin-right: 10%; 839 padding-left: 48px; 840 padding-right: 48px; 841 } 842 843 // Child blocks: All alignments except full 844 > .wp-block:not([data-align="full"]) { 845 max-width: calc(100vw - (2 * 1rem)); 846 847 @include media(tablet) { 848 max-width: calc(8 * (100vw / 12)); 849 } 850 851 @include media(desktop) { 852 max-width: calc(6 * (100vw / 12)); 853 } 854 } 855 856 // Child blocks: Right alignments 857 > .wp-block[data-align="right"] { 858 859 @include media(tablet) { 860 max-width: 125%; 861 } 862 } 863 864 // Child blocks: Wide alignments 865 > .wp-block[data-align="wide"] { 866 867 @include media(tablet) { 868 width: calc(100% + 4px); 869 max-width: calc(100% + 4px); 870 } 871 } 872 873 // Child blocks: Full alignments 874 > .wp-block[data-align=full] { 875 max-width: calc(100vw + (2 * 1rem)); 876 877 @include media(mobile) { 878 width: calc(100% + 92px); 879 left: -46px; 880 } 881 882 @include media(tablet) { 883 left: calc(-12.5% - 58px); 884 width: calc(125% + 120px); 885 max-width: calc(125% + 119px); 886 } 887 } 888 } 889 } 890 891 // Group block with background color 892 > .editor-block-list__block-edit > div > .wp-block-group.has-background { 893 894 // When the Group block is full width, we can remove the left/right padding 895 // and let this inherit the 896 padding: $group-block-background__padding 0; 897 898 @include media(mobile) { 899 padding-left: 0; 900 padding-right: 0; 901 } 902 903 // Child blocks: Full alignment 904 > .wp-block-group__inner-container > .editor-inner-blocks > .editor-block-list__layout > .wp-block[data-align="full"] { 905 margin-left: 0; 906 width: 100%; 907 908 @include media(mobile) { 909 width: calc(100% + 92px); 910 } 911 912 @include media(tablet) { 913 width: calc(125% + 120px); 914 } 915 } 916 } 917 } 918 } -
trunk/src/wp-content/themes/twentynineteen/style-rtl.css
r45289 r45605 5187 5187 /* !Block styles */ 5188 5188 .entry .entry-content > *, 5189 .entry .entry-summary > * { 5189 .entry .entry-summary > *, 5190 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5191 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5190 5192 margin: 32px 0; 5191 5193 max-width: 100%; … … 5194 5196 @media only screen and (min-width: 768px) { 5195 5197 .entry .entry-content > *, 5196 .entry .entry-summary > * { 5198 .entry .entry-summary > *, 5199 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5200 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5197 5201 max-width: calc(8 * (100vw / 12) - 28px); 5198 5202 } … … 5201 5205 @media only screen and (min-width: 1168px) { 5202 5206 .entry .entry-content > *, 5203 .entry .entry-summary > * { 5207 .entry .entry-summary > *, 5208 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5209 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5204 5210 max-width: calc(6 * (100vw / 12) - 28px); 5205 5211 } … … 5208 5214 @media only screen and (min-width: 768px) { 5209 5215 .entry .entry-content > *, 5210 .entry .entry-summary > * { 5216 .entry .entry-summary > *, 5217 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5218 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5211 5219 margin: 32px 0; 5212 5220 } 5213 5221 } 5214 5222 5215 .entry .entry-content > * > *:first-child,5216 .entry .entry-summary > * > *:first-child {5217 margin-top: 0;5218 }5219 5220 .entry .entry-content > * > *:last-child,5221 .entry .entry-summary > * > *:last-child {5222 margin-bottom: 0;5223 }5224 5225 5223 .entry .entry-content > *.alignwide, 5226 .entry .entry-summary > *.alignwide { 5224 .entry .entry-summary > *.alignwide, 5225 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignwide, 5226 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignwide { 5227 5227 margin-right: auto; 5228 5228 margin-left: auto; … … 5232 5232 @media only screen and (min-width: 768px) { 5233 5233 .entry .entry-content > *.alignwide, 5234 .entry .entry-summary > *.alignwide { 5234 .entry .entry-summary > *.alignwide, 5235 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignwide, 5236 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignwide { 5235 5237 width: 100%; 5236 5238 max-width: 100%; … … 5239 5241 5240 5242 .entry .entry-content > *.alignfull, 5241 .entry .entry-summary > *.alignfull { 5243 .entry .entry-summary > *.alignfull, 5244 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignfull, 5245 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignfull { 5242 5246 position: relative; 5243 5247 right: -1rem; … … 5249 5253 @media only screen and (min-width: 768px) { 5250 5254 .entry .entry-content > *.alignfull, 5251 .entry .entry-summary > *.alignfull { 5255 .entry .entry-summary > *.alignfull, 5256 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignfull, 5257 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignfull { 5252 5258 margin-top: calc(2 * 1rem); 5253 5259 margin-bottom: calc(2 * 1rem); … … 5259 5265 5260 5266 .entry .entry-content > *.alignleft, 5261 .entry .entry-summary > *.alignleft { 5267 .entry .entry-summary > *.alignleft, 5268 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignleft, 5269 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignleft { 5262 5270 float: left; 5263 5271 max-width: calc(5 * (100vw / 12)); … … 5269 5277 @media only screen and (min-width: 768px) { 5270 5278 .entry .entry-content > *.alignleft, 5271 .entry .entry-summary > *.alignleft { 5279 .entry .entry-summary > *.alignleft, 5280 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignleft, 5281 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignleft { 5272 5282 max-width: calc(4 * (100vw / 12)); 5273 5283 margin-right: calc(2 * 1rem); … … 5276 5286 5277 5287 .entry .entry-content > *.alignright, 5278 .entry .entry-summary > *.alignright { 5288 .entry .entry-summary > *.alignright, 5289 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignright, 5290 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignright { 5279 5291 float: right; 5280 5292 max-width: calc(5 * (100vw / 12)); … … 5286 5298 @media only screen and (min-width: 768px) { 5287 5299 .entry .entry-content > *.alignright, 5288 .entry .entry-summary > *.alignright { 5300 .entry .entry-summary > *.alignright, 5301 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignright, 5302 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignright { 5289 5303 max-width: calc(4 * (100vw / 12)); 5290 5304 margin-left: 0; … … 5294 5308 5295 5309 .entry .entry-content > *.aligncenter, 5296 .entry .entry-summary > *.aligncenter { 5310 .entry .entry-summary > *.aligncenter, 5311 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5312 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5297 5313 margin-right: auto; 5298 5314 margin-left: auto; … … 5301 5317 @media only screen and (min-width: 768px) { 5302 5318 .entry .entry-content > *.aligncenter, 5303 .entry .entry-summary > *.aligncenter { 5319 .entry .entry-summary > *.aligncenter, 5320 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5321 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5304 5322 max-width: calc(8 * (100vw / 12) - 28px); 5305 5323 } … … 5308 5326 @media only screen and (min-width: 1168px) { 5309 5327 .entry .entry-content > *.aligncenter, 5310 .entry .entry-summary > *.aligncenter { 5328 .entry .entry-summary > *.aligncenter, 5329 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5330 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5311 5331 max-width: calc(6 * (100vw / 12) - 28px); 5312 5332 } … … 5315 5335 @media only screen and (min-width: 768px) { 5316 5336 .entry .entry-content > *.aligncenter, 5317 .entry .entry-summary > *.aligncenter { 5337 .entry .entry-summary > *.aligncenter, 5338 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5339 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5318 5340 margin-right: 0; 5319 5341 margin-left: 0; 5320 5342 } 5343 } 5344 5345 .entry .entry-content > * > *:first-child, 5346 .entry .entry-summary > * > *:first-child { 5347 margin-top: 0; 5348 } 5349 5350 .entry .entry-content > * > *:last-child, 5351 .entry .entry-summary > * > *:last-child { 5352 margin-bottom: 0; 5321 5353 } 5322 5354 … … 5737 5769 .entry .entry-content .wp-block-image img { 5738 5770 display: block; 5771 } 5772 5773 @media only screen and (min-width: 768px) { 5774 .entry .entry-content .wp-block-image:not(.alignwide):not(.alignfull) > img { 5775 max-width: calc(8 * (100vw / 12) - 28px); 5776 } 5777 } 5778 5779 @media only screen and (min-width: 1168px) { 5780 .entry .entry-content .wp-block-image:not(.alignwide):not(.alignfull) > img { 5781 max-width: calc(6 * (100vw / 12) - 28px); 5782 } 5739 5783 } 5740 5784 … … 6039 6083 6040 6084 @media only screen and (min-width: 768px) { 6085 .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { 6086 max-width: 100%; 6087 } 6088 } 6089 6090 @media only screen and (min-width: 1168px) { 6091 .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { 6092 max-width: 100%; 6093 } 6094 } 6095 6096 @media only screen and (min-width: 768px) { 6041 6097 .entry .entry-content .wp-block-columns { 6042 6098 flex-wrap: nowrap; … … 6044 6100 .entry .entry-content .wp-block-columns .wp-block-column:not(:first-child) { 6045 6101 margin-right: 32px; 6102 } 6103 } 6104 6105 @media only screen and (min-width: 768px) { 6106 .entry .entry-content .wp-block-group:not(.alignfull) > .wp-block-group__inner-container > .alignfull, 6107 .entry .entry-content .wp-block-group:not(.alignfull) > .wp-block-group__inner-container > .wp-block-image > img { 6108 right: 0; 6109 max-width: 100%; 6110 } 6111 } 6112 6113 .entry .entry-content .wp-block-group.alignfull > .wp-block-group__inner-container { 6114 max-width: calc(100% - (2 * 1rem)); 6115 margin: 0 1rem; 6116 } 6117 6118 @media only screen and (min-width: 768px) { 6119 .entry .entry-content .wp-block-group.alignfull > .wp-block-group__inner-container { 6120 max-width: 80%; 6121 margin: 0 10%; 6122 padding: 0 60px; 6123 } 6124 } 6125 6126 .entry .entry-content .wp-block-group.has-background { 6127 padding: 1rem; 6128 margin-top: 0; 6129 margin-bottom: 0; 6130 } 6131 6132 .entry .entry-content .wp-block-group.has-background .wp-block-group__inner-container > *:first-child { 6133 margin-top: 0; 6134 } 6135 6136 .entry .entry-content .wp-block-group.has-background .wp-block-group__inner-container > *:last-child { 6137 margin-bottom: 0; 6138 } 6139 6140 .entry .entry-content .wp-block-group.has-background.alignfull { 6141 padding-right: 0; 6142 padding-left: 0; 6143 } 6144 6145 @media only screen and (min-width: 768px) { 6146 .entry .entry-content .wp-block-group.has-background.alignfull { 6147 padding-top: 1rem; 6148 padding-bottom: 1rem; 6149 } 6150 } 6151 6152 .entry .entry-content .wp-block-group.has-background:not(.alignfull) > .wp-block-group__inner-container > .alignfull { 6153 width: 100%; 6154 max-width: 100%; 6155 } 6156 6157 @media only screen and (min-width: 768px) { 6158 .entry .entry-content .wp-block-group.has-background:not(.alignfull) > .wp-block-group__inner-container > .alignfull { 6159 width: calc( 100% + 2rem); 6160 max-width: calc( 100% + 2rem); 6161 margin-right: -1rem; 6046 6162 } 6047 6163 } -
trunk/src/wp-content/themes/twentynineteen/style.css
r45289 r45605 5193 5193 /* !Block styles */ 5194 5194 .entry .entry-content > *, 5195 .entry .entry-summary > * { 5195 .entry .entry-summary > *, 5196 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5197 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5196 5198 margin: 32px 0; 5197 5199 max-width: 100%; … … 5200 5202 @media only screen and (min-width: 768px) { 5201 5203 .entry .entry-content > *, 5202 .entry .entry-summary > * { 5204 .entry .entry-summary > *, 5205 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5206 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5203 5207 max-width: calc(8 * (100vw / 12) - 28px); 5204 5208 } … … 5207 5211 @media only screen and (min-width: 1168px) { 5208 5212 .entry .entry-content > *, 5209 .entry .entry-summary > * { 5213 .entry .entry-summary > *, 5214 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5215 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5210 5216 max-width: calc(6 * (100vw / 12) - 28px); 5211 5217 } … … 5214 5220 @media only screen and (min-width: 768px) { 5215 5221 .entry .entry-content > *, 5216 .entry .entry-summary > * { 5222 .entry .entry-summary > *, 5223 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *, 5224 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > * { 5217 5225 margin: 32px 0; 5218 5226 } 5219 5227 } 5220 5228 5221 .entry .entry-content > * > *:first-child,5222 .entry .entry-summary > * > *:first-child {5223 margin-top: 0;5224 }5225 5226 .entry .entry-content > * > *:last-child,5227 .entry .entry-summary > * > *:last-child {5228 margin-bottom: 0;5229 }5230 5231 5229 .entry .entry-content > *.alignwide, 5232 .entry .entry-summary > *.alignwide { 5230 .entry .entry-summary > *.alignwide, 5231 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignwide, 5232 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignwide { 5233 5233 margin-left: auto; 5234 5234 margin-right: auto; … … 5238 5238 @media only screen and (min-width: 768px) { 5239 5239 .entry .entry-content > *.alignwide, 5240 .entry .entry-summary > *.alignwide { 5240 .entry .entry-summary > *.alignwide, 5241 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignwide, 5242 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignwide { 5241 5243 width: 100%; 5242 5244 max-width: 100%; … … 5245 5247 5246 5248 .entry .entry-content > *.alignfull, 5247 .entry .entry-summary > *.alignfull { 5249 .entry .entry-summary > *.alignfull, 5250 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignfull, 5251 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignfull { 5248 5252 position: relative; 5249 5253 left: -1rem; … … 5255 5259 @media only screen and (min-width: 768px) { 5256 5260 .entry .entry-content > *.alignfull, 5257 .entry .entry-summary > *.alignfull { 5261 .entry .entry-summary > *.alignfull, 5262 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignfull, 5263 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignfull { 5258 5264 margin-top: calc(2 * 1rem); 5259 5265 margin-bottom: calc(2 * 1rem); … … 5265 5271 5266 5272 .entry .entry-content > *.alignleft, 5267 .entry .entry-summary > *.alignleft { 5273 .entry .entry-summary > *.alignleft, 5274 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignleft, 5275 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignleft { 5268 5276 /*rtl:ignore*/ 5269 5277 float: left; … … 5277 5285 @media only screen and (min-width: 768px) { 5278 5286 .entry .entry-content > *.alignleft, 5279 .entry .entry-summary > *.alignleft { 5287 .entry .entry-summary > *.alignleft, 5288 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignleft, 5289 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignleft { 5280 5290 max-width: calc(4 * (100vw / 12)); 5281 5291 /*rtl:ignore*/ … … 5285 5295 5286 5296 .entry .entry-content > *.alignright, 5287 .entry .entry-summary > *.alignright { 5297 .entry .entry-summary > *.alignright, 5298 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignright, 5299 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignright { 5288 5300 /*rtl:ignore*/ 5289 5301 float: right; … … 5297 5309 @media only screen and (min-width: 768px) { 5298 5310 .entry .entry-content > *.alignright, 5299 .entry .entry-summary > *.alignright { 5311 .entry .entry-summary > *.alignright, 5312 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.alignright, 5313 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.alignright { 5300 5314 max-width: calc(4 * (100vw / 12)); 5301 5315 margin-right: 0; … … 5306 5320 5307 5321 .entry .entry-content > *.aligncenter, 5308 .entry .entry-summary > *.aligncenter { 5322 .entry .entry-summary > *.aligncenter, 5323 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5324 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5309 5325 margin-left: auto; 5310 5326 margin-right: auto; … … 5313 5329 @media only screen and (min-width: 768px) { 5314 5330 .entry .entry-content > *.aligncenter, 5315 .entry .entry-summary > *.aligncenter { 5331 .entry .entry-summary > *.aligncenter, 5332 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5333 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5316 5334 max-width: calc(8 * (100vw / 12) - 28px); 5317 5335 } … … 5320 5338 @media only screen and (min-width: 1168px) { 5321 5339 .entry .entry-content > *.aligncenter, 5322 .entry .entry-summary > *.aligncenter { 5340 .entry .entry-summary > *.aligncenter, 5341 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5342 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5323 5343 max-width: calc(6 * (100vw / 12) - 28px); 5324 5344 } … … 5327 5347 @media only screen and (min-width: 768px) { 5328 5348 .entry .entry-content > *.aligncenter, 5329 .entry .entry-summary > *.aligncenter { 5349 .entry .entry-summary > *.aligncenter, 5350 .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter, 5351 .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter { 5330 5352 margin-left: 0; 5331 5353 margin-right: 0; 5332 5354 } 5355 } 5356 5357 .entry .entry-content > * > *:first-child, 5358 .entry .entry-summary > * > *:first-child { 5359 margin-top: 0; 5360 } 5361 5362 .entry .entry-content > * > *:last-child, 5363 .entry .entry-summary > * > *:last-child { 5364 margin-bottom: 0; 5333 5365 } 5334 5366 … … 5749 5781 .entry .entry-content .wp-block-image img { 5750 5782 display: block; 5783 } 5784 5785 @media only screen and (min-width: 768px) { 5786 .entry .entry-content .wp-block-image:not(.alignwide):not(.alignfull) > img { 5787 max-width: calc(8 * (100vw / 12) - 28px); 5788 } 5789 } 5790 5791 @media only screen and (min-width: 1168px) { 5792 .entry .entry-content .wp-block-image:not(.alignwide):not(.alignfull) > img { 5793 max-width: calc(6 * (100vw / 12) - 28px); 5794 } 5751 5795 } 5752 5796 … … 6051 6095 6052 6096 @media only screen and (min-width: 768px) { 6097 .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { 6098 max-width: 100%; 6099 } 6100 } 6101 6102 @media only screen and (min-width: 1168px) { 6103 .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { 6104 max-width: 100%; 6105 } 6106 } 6107 6108 @media only screen and (min-width: 768px) { 6053 6109 .entry .entry-content .wp-block-columns { 6054 6110 flex-wrap: nowrap; … … 6056 6112 .entry .entry-content .wp-block-columns .wp-block-column:not(:first-child) { 6057 6113 margin-left: 32px; 6114 } 6115 } 6116 6117 @media only screen and (min-width: 768px) { 6118 .entry .entry-content .wp-block-group:not(.alignfull) > .wp-block-group__inner-container > .alignfull, 6119 .entry .entry-content .wp-block-group:not(.alignfull) > .wp-block-group__inner-container > .wp-block-image > img { 6120 left: 0; 6121 max-width: 100%; 6122 } 6123 } 6124 6125 .entry .entry-content .wp-block-group.alignfull > .wp-block-group__inner-container { 6126 max-width: calc(100% - (2 * 1rem)); 6127 margin: 0 1rem; 6128 } 6129 6130 @media only screen and (min-width: 768px) { 6131 .entry .entry-content .wp-block-group.alignfull > .wp-block-group__inner-container { 6132 max-width: 80%; 6133 margin: 0 10%; 6134 padding: 0 60px; 6135 } 6136 } 6137 6138 .entry .entry-content .wp-block-group.has-background { 6139 padding: 1rem; 6140 margin-top: 0; 6141 margin-bottom: 0; 6142 } 6143 6144 .entry .entry-content .wp-block-group.has-background .wp-block-group__inner-container > *:first-child { 6145 margin-top: 0; 6146 } 6147 6148 .entry .entry-content .wp-block-group.has-background .wp-block-group__inner-container > *:last-child { 6149 margin-bottom: 0; 6150 } 6151 6152 .entry .entry-content .wp-block-group.has-background.alignfull { 6153 padding-left: 0; 6154 padding-right: 0; 6155 } 6156 6157 @media only screen and (min-width: 768px) { 6158 .entry .entry-content .wp-block-group.has-background.alignfull { 6159 padding-top: 1rem; 6160 padding-bottom: 1rem; 6161 } 6162 } 6163 6164 .entry .entry-content .wp-block-group.has-background:not(.alignfull) > .wp-block-group__inner-container > .alignfull { 6165 width: 100%; 6166 max-width: 100%; 6167 } 6168 6169 @media only screen and (min-width: 768px) { 6170 .entry .entry-content .wp-block-group.has-background:not(.alignfull) > .wp-block-group__inner-container > .alignfull { 6171 width: calc( 100% + 2rem); 6172 max-width: calc( 100% + 2rem); 6173 margin-left: -1rem; 6058 6174 } 6059 6175 }
Note: See TracChangeset
for help on using the changeset viewer.