Support » Plugin: AMP » Error “CSS !important” The Answer

  • compointdesigner

    (@compointdesigner)


    The problem is the use of some themes shortcodes. For example if I create a post with only text and images, this error will not show up, but if I put any shortcodes, this code is inserted in amps pages, example:

    If I add in my post the shortcode:

    [hr style = “1” margin = “0px 5px 5px 0px”]

    When the page is generated that code becomes:

    <div class = “hr hr -1” style = ‘margin: 5px 0px 5px 0px important; “> </ div>

    And automatically the AMP plugin is putting it as follows:

    } / * Inline styles * /
    .amp-wp-inline-d922dd8cdb9e0538e14ecf049922015f {margin: 5px 0px 5px 0px important;} </ style>

    This does not occur in previous versions, only in 0.4

    I hope this helps and apologize for my english 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thanks for the report! We’re working on a fix here which should be released as part of 0.4.1 soon: https://github.com/Automattic/amp-wp/pull/525

    pako69

    (@pako69)

    hi @batmoo thanks and waiting for it 🙂

    > just a simple question please : I have made on my websites a heavy customisation of your templates (based on the last one: 0.4) s I hope the 0.4.1 will not break anything…

    • This reply was modified 4 years ago by pako69.

    0.4.1 just has 3 small bug fixes.

    pako69

    (@pako69)

    Great!
    I hope they will remove some strange behaviors like adding extra padding in your .amp-wp-inline classes

    In this page: http://www.pascal-bourhis.net/google/serposcope/amp your plugin has generared this:

    .amp-wp-inline-73cafbe3738584bd34670f69221f6b3e {
        padding-bottom: 28.666666666667%;
    }

    which cause an extra big space under some elements, I removed it by:

    .amp-wp-article-content .avia-slideshow-inner.amp-wp-inline-73cafbe3738584bd34670f69221f6b3e {
        padding-bottom: 0;
    }
    compointdesigner

    (@compointdesigner)

    Thank you @batmoo for the quick answer and fix.
    Problem solved!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error “CSS !important” The Answer’ is closed to new replies.