fauzanjeg

add custom css for AMP mode

Oct 31st, 2021 (edited)
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. /* add custom css for AMP mode */
  2. function fix_rtl_mode_on_amp() {
  3.     ?>
  4.     .rtl .jeg_reviewstars .reviewscore,
  5.     .rtl .jeg_storelist li .priceinfo,
  6.     .rtl .jeg_reviewbars .reviewscore {
  7.         float: left;
  8.     }
  9.     .rtl .jeg_reviewdetail li {
  10.         padding-right: 22px;
  11.         padding-left: unset;
  12.     }
  13.     .rtl .jeg_reviewdetail li > i {
  14.         right: 0;
  15.         left: unset;
  16.     }
  17.     .rtl .dealstitle {
  18.         float: right;
  19.     }
  20.     .rtl .bestprice {
  21.         float: left;
  22.         text-align: left;
  23.     }
  24.     /* Font Awesome Right to Left */
  25.     /* Horizontal Flip */
  26.     .rtl .fa-star-half-o {
  27.         -moz-transform: scale(-1, 1);
  28.         -webkit-transform: scale(-1, 1);
  29.         -o-transform: scale(-1, 1);
  30.         -ms-transform: scale(-1, 1);
  31.         transform: scale(-1, 1);
  32.     }
  33.     <?php
  34. }
  35. add_action( 'amp_post_template_css', 'fix_rtl_mode_on_amp' );
Add Comment
Please, Sign In to add comment