-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert width attribute in col tags to equivalent CSS rule #1064
Changes from 3 commits
407c26c
b09bb46
11293d4
45af2ed
a1eda20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,14 +49,6 @@ public function get_body_style_attribute_data() { | |
), | ||
), | ||
|
||
'width_to_max-width' => array( | ||
'<figure style="width: 300px"></figure>', | ||
'<figure class="amp-wp-343bce0"></figure>', | ||
array( | ||
':root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-343bce0{max-width:300px;}', | ||
), | ||
), | ||
|
||
'span_display_none' => array( | ||
'<span style="display: none;">Kses-banned properties are allowed since Kses will have already applied if user does not have unfiltered_html.</span>', | ||
'<span class="amp-wp-224b51a">Kses-banned properties are allowed since Kses will have already applied if user does not have unfiltered_html.</span>', | ||
|
@@ -156,6 +148,28 @@ public function get_body_style_attribute_data() { | |
':root:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-ab79d9e{color:purple;}', | ||
), | ||
), | ||
|
||
'col_with_width_attribute' => array( | ||
'<table><colgroup><col width="253"/></colgroup></table>', | ||
'<table><colgroup><col class="amp-wp-cbcb5c2"></colgroup></table>', | ||
array( | ||
':root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-cbcb5c2{width:253px;}', | ||
), | ||
), | ||
|
||
'col_with_percent_width_attribute' => array( | ||
'<table><colgroup><col width="50%"/></colgroup></table>', | ||
'<table><colgroup><col class="amp-wp-cd7753e"></colgroup></table>', | ||
array( | ||
':root:not(#_):not(#_):not(#_):not(#_):not(#_) .amp-wp-cd7753e{width:50%;}', | ||
), | ||
), | ||
|
||
'col_with_star_width_attribute' => array( | ||
'<table><colgroup><col width="0*"/></colgroup></table>', | ||
'<table><colgroup><col width="0*"></colgroup></table>', | ||
array(), | ||
), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a test for when a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also add a test for percentage-based There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add one more test with a |
||
); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
width
should have been extracted to a stylesheet here.