Skip to content

Commit ba4d80d

Browse files
Twenty Nineteen: Correct center or right alignment for Download link in the File block.
Follow-up to [43808]. Props lakshyajeet, truptikanzariya, sabernhardt, sourabhjain, SirLouen, poojapadamad, SergeyBiryukov. Fixes #59263. git-svn-id: https://develop.svn.wordpress.org/trunk@61284 602fd350-edb4-49c9-b593-d223f7449a82
1 parent e870c4a commit ba4d80d

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,16 @@
804804
outline-offset: -4px;
805805
}
806806
}
807+
808+
&.aligncenter .wp-block-file__button {
809+
margin-left: auto;
810+
margin-right: auto;
811+
}
812+
813+
&.alignright .wp-block-file__button {
814+
margin-left: auto;
815+
margin-right: 0;
816+
}
807817
}
808818

809819
//! Code

src/wp-content/themes/twentynineteen/style-editor.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,16 @@ ul.wp-block-archives li ul,
13861386
text-align: center;
13871387
}
13881388

1389+
.wp-block[data-align="center"] .wp-block-file__button {
1390+
margin-left: auto;
1391+
margin-right: auto;
1392+
}
1393+
1394+
.wp-block[data-align="right"] .wp-block-file__button {
1395+
margin-left: auto;
1396+
margin-right: 0;
1397+
}
1398+
13891399
/** === Latest Posts === */
13901400
.wp-block-latest-posts .wp-block-latest-posts__post-date {
13911401
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

src/wp-content/themes/twentynineteen/style-editor.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,16 @@ ul.wp-block-archives,
782782
text-align: center;
783783
}
784784

785+
.wp-block[data-align="center"] .wp-block-file__button {
786+
margin-left: auto;
787+
margin-right: auto;
788+
}
789+
790+
.wp-block[data-align="right"] .wp-block-file__button {
791+
margin-left: auto;
792+
margin-right: 0;
793+
}
794+
785795
/** === Latest Posts === */
786796
.wp-block-latest-posts {
787797

src/wp-content/themes/twentynineteen/style-rtl.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,6 +6208,16 @@ body.page .main-navigation {
62086208
outline-offset: -4px;
62096209
}
62106210

6211+
.entry .entry-content .wp-block-file.aligncenter .wp-block-file__button {
6212+
margin-right: auto;
6213+
margin-left: auto;
6214+
}
6215+
6216+
.entry .entry-content .wp-block-file.alignright .wp-block-file__button {
6217+
margin-right: auto;
6218+
margin-left: 0;
6219+
}
6220+
62116221
.entry .entry-content .wp-block-code {
62126222
border-radius: 0;
62136223
}

src/wp-content/themes/twentynineteen/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6220,6 +6220,16 @@ body.page .main-navigation {
62206220
outline-offset: -4px;
62216221
}
62226222

6223+
.entry .entry-content .wp-block-file.aligncenter .wp-block-file__button {
6224+
margin-left: auto;
6225+
margin-right: auto;
6226+
}
6227+
6228+
.entry .entry-content .wp-block-file.alignright .wp-block-file__button {
6229+
margin-left: auto;
6230+
margin-right: 0;
6231+
}
6232+
62236233
.entry .entry-content .wp-block-code {
62246234
border-radius: 0;
62256235
}

0 commit comments

Comments
 (0)