1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

remarkup.css: Consistently zero top/bottom margins for first/last block-level children

Summary:
For block-level elements that have a margin-top or margin-bottom set
(generally to 12px), also reset the appropriate margin to 0 when
they're a first-child or last-child of their parents.

The change doesn't affect nested lists, their selector is more specific.

Test Plan:
Look at some comments or wiki documents that end with different
block elements, verify that the margins are pretty.

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: #blessed_reviewers, chad

Subscribers: Korvin, epriestley

Projects: #remarkup

Maniphest Tasks: T6968

Differential Revision: https://secure.phabricator.com/D11382
This commit is contained in:
epriestley 2015-01-14 12:14:22 -08:00
parent a85452b8d6
commit 2297a43d44
3 changed files with 35 additions and 25 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '38e621cb',
'core.pkg.css' => '8d1c0f87',
'core.pkg.js' => '27bb3264',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
@ -105,7 +105,7 @@ return array(
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
'rsrc/css/application/uiexample/example.css' => '528b19de',
'rsrc/css/core/core.css' => 'ca42b69f',
'rsrc/css/core/remarkup.css' => '7604f12e',
'rsrc/css/core/remarkup.css' => '0ee3d256',
'rsrc/css/core/syntax.css' => '56c1ba38',
'rsrc/css/core/z-index.css' => '44e1d311',
'rsrc/css/diviner/diviner-shared.css' => '38813222',
@ -729,7 +729,7 @@ return array(
'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => '72da38cc',
'phabricator-profile-css' => 'fddedfa1',
'phabricator-remarkup-css' => '7604f12e',
'phabricator-remarkup-css' => '0ee3d256',
'phabricator-search-results-css' => 'f240504c',
'phabricator-shaped-request' => '7cbe244b',
'phabricator-side-menu-view-css' => '7e8c6341',

View file

@ -5214,6 +5214,7 @@ phutil_register_library_map(array(
'PhabricatorOAuthServerClient' => array(
'PhabricatorOAuthServerDAO',
'PhabricatorPolicyInterface',
'PhabricatorDestructibleInterface',
),
'PhabricatorOAuthServerClientAuthorizationPHIDType' => 'PhabricatorPHIDType',
'PhabricatorOAuthServerClientPHIDType' => 'PhabricatorPHIDType',
@ -5350,6 +5351,7 @@ phutil_register_library_map(array(
'PhabricatorPolicy' => array(
'PhabricatorPolicyDAO',
'PhabricatorPolicyInterface',
'PhabricatorDestructibleInterface',
),
'PhabricatorPolicyApplication' => 'PhabricatorApplication',
'PhabricatorPolicyAwareQuery' => 'PhabricatorOffsetPagedQuery',

View file

@ -10,10 +10,6 @@
margin: 0 0 12px;
}
.phabricator-remarkup p:last-child {
margin-bottom: 0;
}
.phabricator-remarkup .remarkup-code-block {
margin: 12px;
white-space: pre;
@ -96,24 +92,6 @@
list-style-type: none;
}
.phabricator-remarkup h1.remarkup-header:first-child,
.phabricator-remarkup h2.remarkup-header:first-child,
.phabricator-remarkup h3.remarkup-header:first-child,
.phabricator-remarkup h4.remarkup-header:first-child,
.phabricator-remarkup h5.remarkup-header:first-child,
.phabricator-remarkup h6.remarkup-header:first-child {
margin-top: 0;
}
.phabricator-remarkup h1.remarkup-header:last-child,
.phabricator-remarkup h2.remarkup-header:last-child,
.phabricator-remarkup h3.remarkup-header:last-child,
.phabricator-remarkup h4.remarkup-header:last-child,
.phabricator-remarkup h5.remarkup-header:last-child,
.phabricator-remarkup h6.remarkup-header:last-child {
margin-bottom: 0;
}
.phabricator-remarkup h1.remarkup-header {
font-size: 1.625em;
line-height: 1.625em;
@ -341,6 +319,36 @@
padding: 3px 6px;
}
.phabricator-remarkup p:first-child,
.phabricator-remarkup ul.remarkup-list:first-child,
.phabricator-remarkup ol.remarkup-list:first-child,
.phabricator-remarkup .remarkup-code-block:first-child,
.phabricator-remarkup h1.remarkup-header:first-child,
.phabricator-remarkup h2.remarkup-header:first-child,
.phabricator-remarkup h3.remarkup-header:first-child,
.phabricator-remarkup h4.remarkup-header:first-child,
.phabricator-remarkup h5.remarkup-header:first-child,
.phabricator-remarkup h6.remarkup-header:first-child,
.phabricator-remarkup blockquote:first-child,
.phabricator-remarkup table.remarkup-table:first-child {
margin-top: 0;
}
.phabricator-remarkup p:last-child,
.phabricator-remarkup ul.remarkup-list:last-child,
.phabricator-remarkup ol.remarkup-list:last-child,
.phabricator-remarkup .remarkup-code-block:last-child,
.phabricator-remarkup h1.remarkup-header:last-child,
.phabricator-remarkup h2.remarkup-header:last-child,
.phabricator-remarkup h3.remarkup-header:last-child,
.phabricator-remarkup h4.remarkup-header:last-child,
.phabricator-remarkup h5.remarkup-header:last-child,
.phabricator-remarkup h6.remarkup-header:last-child,
.phabricator-remarkup blockquote:last-child,
.phabricator-remarkup table.remarkup-table:last-child {
margin-bottom: 0;
}
.remarkup-assist-textarea {
border-left-color: {$blueborder};
border-right-color: {$blueborder};