简体   繁体   English

Silktide Cookie许可3.0.3与使用CSS伪元素的Font Awesome 5.0.2冲突

[英]Silktide cookie consent 3.0.3 conflict with Font Awesome 5.0.2 using CSS Pseudo-elements

There seems to be a bug when using this these 2 libraries together and trying to use CSS Pseudo-elements. 当将这两个库一起使用并尝试使用CSS伪元素时,似乎存在一个错误。

I have created a demo here: http://tappetyclick.com/fontawesomebug/ . 我在这里创建了一个演示: http : //tappetyclick.com/fontawesomebug/ The text in the anchor which has the pseudo-element disappears and I only see the icon 锚中具有伪元素的文本消失,我只看到图标

If I remove the cookie consent plugin code then everything seems to work as expected see http://tappetyclick.com/fontawesomebug/test.htm 如果我删除了Cookie同意插件代码,那么一切似乎都能按预期工作,请参阅http://tappetyclick.com/fontawesomebug/test.htm

Has anyone else seen this issue or know what might be causing it. 是否有其他人看到过此问题或是否可能导致此问题。

I could be massively wrong, this is just a guess. 我可能完全错了,这只是一个猜测。

I think this is happening because cookie consent defines the aria-labelledby attr as cookieconsent:desc but the : is the pseudo element selector, therefor it is trying to find a :desc pseudo selector (which clearly doesn't exist). 我认为发生这种情况是因为Cookie同意将attr aria-labelledbyaria-labelledby cookieconsent:desc定义为cookieconsent:desc:是伪元素选择器,因此它正在尝试查找:desc伪选择器(显然不存在)。

You MIGHT be able to stop this error by defining it in jQuery 也许可以在jQuery的定义它停止这种错误

jQuery.extend(jQuery.expr[':'], {
  // add the :desc pseudo-selector to jQuery
  desc: function (el, index, selector) {
    // stub for now
    return false;
  }
});

or what ever selector library you may be using. 或您可能正在使用的选择器库。

Thats my best guess at least 那是我最好的猜测

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM