Good morning, these lines make appear in my which user-agent is being used by the client, this helped me with problems in the Trident engine that does not interpret the gradient in the text and works very well.
var useragent = document.documentElement;
useragent.setAttribute('data-useragent', navigator.userAgent);
useragent.setAttribute('data-platform', navigator.platform);
For me to put the style I want according to the user-agent I use this parameter in CSS
html[data-useragent*='Trident'] section#id.class{}
"Trident" I can switch to anything else like "section # id.class {}", what I want now is for it to check if there is NO engine I want, I want to know if it's user- agent exists 'Mobile' and I tried with
html[data-useragent*!'Mobile']
but it does not work, in case if '=' (has) thought '!' (it does not) would be the opposite but it does not work, how could I check if it does not exist with this criterion? example of user-agent with and without Mobile
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36