mhango

NPF / Text Post - Image Fix V5

Apr 19th, 2023 (edited)
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. /*
  2.  
  3. Code: NPF / Text Post - Image Fix by @mhango | @themesbyeva
  4. Version 5 (15th June 2023)
  5.  
  6. Rules:
  7. > don't alter / remove the credit
  8. > don't copy parts of this code or use as a base
  9. > don't edit this code and redistribute
  10. > don't claim as your own
  11.  
  12. Disclaimer: This code might not work on every theme. Always back-up your theme before changing the code.
  13.  
  14. For detailed instructions and support please visit https://themesbyeva.tumblr.com.
  15.  
  16. */
  17.  
  18. {block:PermalinkPage}
  19.  
  20. .text figure + p {
  21. margin-top:1em;
  22. }
  23.  
  24. .text:not(:has(.title)):not(:has(p + .npf_row)):has(:is(.tmblr-full img,.post_media_photo_anchor img)):has(.tumblr_blog) p:first-child {
  25. color:{color:background};
  26. font-size:0;
  27. display:none;
  28. }
  29.  
  30. .text:not(:has(.title)):not(:has(p + .npf_row)):has(:is(.tmblr-full img,.post_media_photo_anchor img)):has(.tumblr_blog) p {
  31. color:{color:text};
  32. font-size:12px;
  33. }
  34.  
  35. .text:not(:has(.title)):not(:has(p + .npf_row)):has(:is(.tmblr-full img,.post_media_photo_anchor img)) p {
  36. margin:10px 20px;
  37. }
  38.  
  39. .text:not(:has(.title)):not(:has(p + .npf_row)):has(:is(.tmblr-full img,.post_media_photo_anchor img)) {
  40. background:{color:Notebox Background};
  41. }
  42.  
  43. {/block:PermalinkPage}
  44.  
  45. {block:indexpage}
  46.  
  47. .text:not(:has(.title)):not(:has(p + .npf_row)):has(:is(.tmblr-full img,.post_media_photo_anchor img)):has(.tumblr_blog) {
  48. color:{color:background};
  49. font-size:0;
  50. }
  51. {/block:indexpage}
  52.  
  53.  
  54. .text:has(.tmblr-full img) .op-blockquote,
  55. .text:has(.tmblr-full img) .npf-post-source,
  56. .text:has(.tmblr-full img) .tumblr_blog,
  57. .text:has(.post_media_photo_anchor img) .op-blockquote,
  58. .text:has(.post_media_photo_anchor img) .npf-post-source,
  59. .text:has(.post_media_photo_anchor img) .tumblr_blog
  60. {
  61. display:none;
  62. }
  63.  
  64. .text {
  65. padding:15px;
  66. }
  67.  
  68. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.tmblr-full img),
  69. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.post_media_photo_anchor img) {
  70. padding:0;
  71. }
  72.  
  73. .post_media_photo_anchor img, .post_media_photo img {
  74. height:100%;
  75. width:100%;
  76. }
  77.  
  78. {block:indexpage}
  79.  
  80.  
  81. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.tmblr-full img) :is(p,ul,ol,h1,h2,h3,h4,h5),
  82. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.post_media_photo_anchor img) :is(p,ul,ol,h1,h2,h3,h4,h5)
  83. {
  84. display:none;
  85. }
  86.  
  87. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.tmblr-full img),
  88. .text:not(:has(.title)):not(:has(p + .npf_row)):has(.post_media_photo_anchor img)
  89. {
  90. background-color: {color:background};
  91. border-color:{color:background};
  92. }
  93.  
  94. {/block:indexpage}
  95.  
  96. /* End of Text Post - Image Fix */
Advertisement
Add Comment
Please, Sign In to add comment