From d8a88a19af7cc10f555e92c975250c7d01ffac62 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Sun, 25 Dec 2016 12:58:02 +0100 Subject: [PATCH] Separate notification CSS fixes (fixes badge and urls in screenshots) --- Core/Handling/TweetNotification.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Core/Handling/TweetNotification.cs b/Core/Handling/TweetNotification.cs index e992efe6..baa47732 100644 --- a/Core/Handling/TweetNotification.cs +++ b/Core/Handling/TweetNotification.cs @@ -18,9 +18,15 @@ private static string DefaultHeadTag{ } } + private static string FixedCSS{ + get{ + return @"a[data-full-url]{word-break:break-all}.txt-base-smallest .badge-verified:before{height:13px!important}"; + } + } + private static string CustomCSS{ get{ - return @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}a[data-full-url]{word-break:break-all}#td-skip{opacity:0;cursor:pointer;transition:opacity 0.15s ease}.td-hover #td-skip{opacity:0.75}#td-skip:hover{opacity:1}"; + return @".scroll-styled-v::-webkit-scrollbar{width:8px}.scroll-styled-v::-webkit-scrollbar-thumb{border-radius:0}#td-skip{opacity:0;cursor:pointer;transition:opacity 0.15s ease}.td-hover #td-skip{opacity:0.75}#td-skip:hover{opacity:1}"; } } @@ -106,12 +112,15 @@ public string GenerateHtml(string bodyClasses = null, bool enableCustomCSS = tru build.Append("<head>").Append(HeadTag ?? DefaultHeadTag); if (enableCustomCSS){ - build.Append("<style type='text/css'>").Append(CustomCSS).Append("</style>"); + build.Append("<style type='text/css'>").Append(FixedCSS).Append(CustomCSS).Append("</style>"); if (!string.IsNullOrEmpty(Program.UserConfig.CustomNotificationCSS)){ build.Append("<style type='text/css'>").Append(Program.UserConfig.CustomNotificationCSS).Append("</style>"); } } + else{ + build.Append("<style type='text/css'>").Append(FixedCSS).Append("</style>"); + } build.Append("</head>"); build.Append("<body class='hearty");