border-image slicing differences between browsers - css

I'm seeing some significant differences in how browsers are repeating sliced border images. It's easily demonstrated on https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice
MacOS 10.14.6 Safari 12.1.2
MacOS 10.14.6 Firefox 91.0.1
MacOS 10.14.6 Chrome 92.0.4515.159
So it appears that Safari on MacOS Mojave has an issue. Simple enough if that were the case. But mobile browsers on iOS are also behaving differently.
iOS 14.6 Safari
iOS 14.6 Firefox
iOS 14.6 Chrome
Does anyone have any insight into why these browsers behave differently? Does anyone have insight into how to get the un-stretched results in all browsers that MacOS Firefox and Chrome have?

Essentially, what you are seeing here is Safari behavior vs. the behavior of all other browsers, which sadly is a common frustration of many developers— Safari functioning differently and usually unexpectedly.
What you are seeing on iOS (mobile) is to be expected, because although there are different browser apps, all of them, even Chrome and Firefox are actually Safari (using the Safari browser engine, WebKit), simply reskinned with a different UI. There is only one iOS browser in actuality.
Supporting source #1: https://www.reddit.com/r/firefox/comments/9lpmkh/
As we all know Apple forces all third party browsers on iOS to use WebKit, essentially making them just re skinned versions of Safari; This puts Gecko Based Firefox and other Third party Browsers at a performance disadvantage.
Supporting source #2: https://www.quora.com/Is-Chrome-for-iOS-just-Safari-re-skinned
Google wasn't just being lazy using Safari's rendering engine. Apple requires people making browsers to use the UIWebView object. [This] means “exactly the same rendering engine”.
To be clear, this is a bug in WebKit/Safari. I have opened an official bug report to resolve this: https://bugs.webkit.org/show_bug.cgi?id=229803

This github link I encountered last time shows that border-image in safari is seems to be not solved.
https://github.com/Fyrd/caniuse/issues/2366

Related

How to prevent large fonts from looking jagged in Chrome (OSX)?

Regular fonts look normal, but large fonts look jagged in Chrome (not in Safari or Firefox). I'm using a Macbook Pro running Mojave.
Example codepen
.large {
font-size: 300px
font-weight: bold
}
Chrome
Safari
Firefox
I've tried the recommendations in this SO post (enable-font-cache-scaling and accelerated 2D Canvas), but the issue remains.
Turning chrome://settings "Use hardware acceleration when available" OFF fixed it for me.
At first I was not able to reproduce the jagginess/blockiness, but I realized I was looking at it on MacOS [High] Sierra, and you specified Mojave. So I tried it there, and it is absolutely awful. I'm really surprised this escaped anyone's notice in testing. I'd imagine there will be an update to either Chrome or Mojave that addresses this soon.
I guess this is actually related to a change to the OS defaults; Apple apparently disabled sub-pixel font rendering in Mojave and passed it off as a "refinement". Sub-pixel rendering is handled by the GPU, hence disabling GPU rendering in Chrome "fixes" it. I guess you could also use the defaults write technique specified in the link I mentioned.
In any case: this is probably not something you can address in your CSS code, since it is related to user-local/machine settings.

New "Responsive Design mode" in Safari: Internet Explorer, Chrome, Firefox Emulator

In the new version of Safari there is a new "Responsive Design Mode". You can switch between Safari, Internet Explorer (7,8,9,10) and Firefox. Is it actually running Windows Internet Explorer 7 if I click it?
On a page with icons it changed the positioning of the icon when I changed to IE 7.
It would be pretty helpful if they would actually emulate IE...
Edit:
The same website, on the left with safari selected and on the right site with IE 7.
Image: http://imgur.com/ZLTlzDQ
Image 2: http://imgur.com/XJIHaL1
In this WWDC 2015 video, it is stated that setting the user agent in the responsive design mode sets the UA string only; nothing more. No emulation or whatsoever. Besides, making IE work on OS X would require both tremendous effort and collaboration of Microsoft and Apple. I don't think it will ever happen, especially not for an extension for a non-profit software.
I know this answer doesn't explain your screenshots but I can not comment more on that without seeing the code, yet my 2 cents would be on the css prefixes. Safari might be ignoring / applying them according to the user-agent and that would explain the difference. IE conditional tags would be another possibility that comes to mind.

Sencha Touch CSS3 -webkit browser prefixes etc

I realise that Sencha Touch 2 states that they only support webkit browsers but was looking at just enabling it on a friend's Windows Phone 7.5 to see what it looked like.
I realise that alot of the CSS etc uses -webkit browser prefix like:
-webkit-border-radius:
instead of
border-radius
I understand that if I remove the -webkit- value that older versions of webkit will stop working but Chrome is set to auto update and I'm wondering if there's a list anywhere on the internet that shows the version of webkit for each version of Android/RIM etc.
Something like:
Android 2.0.3 - Webkit 504
Android 2.3.1 - Webkit 634
I guess a solution would be to just to add the one without the browser prefix as well

How long does it usually take for bug fixes in the Webkit nightly build to hit Chrome/Safari updates?

How long does it usually take for bug fixes in the Webkit nightly build to hit Chrome/Safari updates?
This is one I have been looking forward to:
https://bugs.webkit.org/show_bug.cgi?id=22102
Thanks!
Expect new webkit features to be 2 generations behind in chrome:
webkit development
chromium chrome
beta
standard chrome
This cycle can be quite long but usually a new version of chrome gets released 1 month after the previous one. I would count at least 2 versions for a bug to be fixed, so 2 months :)
As for safari, they only update the browser twice to 3 times a year and not in a constant way. Also the updates don't necessarily include a new webkit build but often only security fixes. So you can't really rely on safari for your bug to get fixed but safari 6 coming out this summer with Mac osx lion (probably) will have a pretty new webkit engine. So wait for this summer.

What is WebKit and how is it related to CSS?

More recently, I have been seeing questions with the tag "webkit". Such questions usually tend to be web-based questions relating to CSS, jQuery, layouts, cross-browers compatibility issues, etc...
So what is this "webkit" and how does it relate to CSS? I have also noticed a lot of -webkit-... properties in the source code for various websites. Are these two related?
Update
So from the answers so far... WebKit is a HTML/CSS web browser rendering engine for Safari/Chrome. Are there such engines for IE/Opera/Firefox and what are the differences, pros and cons of using one over the other? Can I use WebKit features in Firefox for example?
The ultimate question... Is WebKit supported by IE?
Update 2
All of the major browsers use different rendering engines. I guess this is a big reason why there are so many cross-browser compatibility issues!
So, is there some kind of project or movement to a standard rendering engine that ALL browsers will use? Will HTML5 bring an end to the cross-browser compatibility issues?
Update: So apparently, WebKit is a HTML/CSS web browser rendering engine for Safari/Chrome. Are there such engines for IE/Opera/Firefox and what are the differences, pros and cons of using one over the other? Can I use WebKit features in Firefox for example?
Every browser is backed by a rendering engine to draw the HTML/CSS web page.
IE → Trident (discontinued)
Edge → EdgeHTML (clean-up fork of Trident) (Edge switched to Blink in 2019)
Firefox → Gecko
Opera → Presto (no longer uses Presto since Feb 2013, consider Opera = Chrome, therefore Blink nowadays)
Safari → WebKit
Chrome → Blink (a fork of Webkit).
See Comparison of web browser engines for a list of comparisons in different areas.
The ultimate question... is WebKit supported by IE?
Not natively.
Addition to what #KennyTM said:
IE
Engine: Trident
CSS-prefix: -ms
Edge
Engine: EdgeHTML → Blink3
CSS-prefix: -ms
Firefox
Engine: Gecko
CSS-prefix: -moz
Opera
Engine: Presto → Blink1
CSS-prefix: -o (Presto) and -webkit (Blink)
Safari
Engine: WebKit
CSS-prefix: -webkit
Chrome
Engine: WebKit → Blink2
CSS-prefix: -webkit
1) On February 12 2013 Opera (version 15+) announces they moving away from their own engine Presto to WebKit named Blink.
2) On April 3 2013 Google (Chrome version 28+) announces they are going to use the WebKit-based Blink engine.
3) On December 6 2018 Microsoft (Microsoft Edge 79+ stable) announces they are going to use the WebKit-based Blink engine.
Webkit is a web browser rendering engine used by Safari and Chrome (among others, but these are the popular ones).
The -webkit prefix on CSS selectors are properties that only this engine is intended to process, very similar to -moz properties. Many of us are hoping this goes away, for example -webkit-border-radius will be replaced by the standard border-radius and you won't need multiple rules for the same thing for multiple browsers. This is really the result of "pre-specification" features that are intended to not interfere with the standard version when it comes about.
For your update:...no it's not related to IE really, IE at least before 9 uses a different rendering engine called Trident.
This has been answered and accepted, but if someone is still wondering why are things a bit messed up today, you'll have to read this:
http://webaim.org/blog/user-agent-string-history/
It gives a good idea of how gecko, webkit and other major rendering engines evolved and what led to the current state of messed up user-agent strings.
Quoting the last paragraph for TL;DR purposes:
And then Google built Chrome, and Chrome used Webkit, and it was like Safari, and wanted pages built for Safari, and so pretended to be Safari. And thus Chrome used WebKit, and pretended to be Safari, and WebKit pretended to be KHTML, and KHTML pretended to be Gecko, and all browsers pretended to be Mozilla, and Chrome called itself Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13, and the user agent string was a complete mess, and near useless, and everyone pretended to be everyone else, and confusion abounded.
-webkit- is simply a group that Chrome, Safari, Opera and iOS browsers fit into. They all have a common ancestor, so often their capabilities/limitations (when it comes to running CSS and Javascript) are confined to the group.
A developer will place -webkit- followed by some code, meaning that the code will only run on Chrome, Safari, Opera and iOS browsers. Here is a complete list:
-webkit- (Chrome, Safari, newer versions of Opera, almost all iOS browsers (including Firefox for iOS); basically, any WebKit based browser)
-moz- (Firefox)
-o- (Old, pre-WebKit, versions of Opera)
-ms- (Internet Explorer and Microsoft Edge)
The ultimate question... Is WebKit supported by IE?
Kind of. Check out Chrome Frame, it's a plugin for Internet Explorer that makes it use the Webkit engine. The only quirk is that you have to persuade your visitors to install the plugin.
Update
Chrome Frame is no longer maintained or supported…
WebKit is a layout engine designed to
allow web browsers to render web
pages. The WebKit engine provides a
set of classes to display web content
in windows, and implements browser
features such as following links when
clicked by the user, managing a
back-forward list, and managing a
history of pages recently visited.
WebKit was originally created as a
fork of KHTML as the layout engine for
Apple's Safari; it is portable to many
other computing platforms. It is also
used in Google's Chrome Browser.
WebKit's WebCore and JavaScriptCore
components are available under the GNU
Lesser General Public License, and the
rest of WebKit is available under a
BSD-style license.
Source Wikipedia
For further information about layout engines you can look here
Webkit is an HTML rendering engine used by Chrome and Safari.
It supports a number of custom CSS properties that are prefixed by -webkit-.
Webkit is the html/css rendering engine used in Apple's Safari browser, and in Google's Chrome.
css values prefixes with -webkit- are webkit-specific, they're usually CSS3 or other non-standardised features.
to answer update 2
w3c is the body that tries to standardize these things, they write the rules, then programmers write their rendering engine to interpret those rules. So basically w3c says DIVs should work "This way" the engine-writer then uses that rule to write their code, any bugs or mis-interpretations of the rules cause the compatibility issues.
Webkit is the rendering engine used in the popular browsers Safari and Chrome, as well as others.
A common problem I have ran into as a website designer is that alot of people use IE6+. No big deal usually, except in CSS I have to add multiple rendering syntax' to parse each request, per browser. It would be very nice if there was a universal rendering setup for CSS that IE can read as easily as Chrome/FF/Opera and webkit. The problem with IE is that if I do NOT use ALL the proper CSS styles and rendering, than my websites look and work great using every browser except IE. This can make for an unhappy, die-hard IE customer.
Example is this: Let us say I need a 1px, grey border with a border-radius of 10%. For Chrome and others, I use the webkit property. Now, for IE, I have to add seperate CSS styles using the simple old CSS values of "border: 1px solid #E5E5E5" and "border-radius: 10%". A positive outcome is not always guaranteed over all IE browser versions, but for the most part this method works fine for me and many others.
Even though this is an older post, there is also another method to rendering for older versions of Internet Explorer. -webkit while being a CSS Vendor Prefix, you can also download a few JS applications and place them in the bottom of the HTML's HEAD.
Try using Modernizr, HTML5 Shiv and Respond.js. These are amazing IE compatible polyfill scripts that use polyfills, and other resources which will help better render HTML5 elements in IE9 and Below.
To use these polyfills, simply add HTML boolean logic to place them, IF the browser is less than the desire IE version. Example code is:
<head>
<!-- HEAD Elements -->
<script src="path/to/modernizr.js" type="text/javascript"></script>
<!--[if lt IE 6]>
<script src="path/to/HTMLSiv.js" type="text/javascript">
</script>
<script src="path/to/respond.js" type="text/javascript">
</script>
<![endif]-->
</head>
Webkit is the rendering engine used in the popular browsers Safari and Chrome, as well as others
Every browser is backed by a rendering engine to draw the HTML/CSS web page.
IE → Trident (discontinued)
Edge → EdgeHTML (clean-up fork of Trident)
Firefox → Gecko
Opera → Presto (no longer uses Presto since Feb 2013, consider Opera = Chrome nowadays)
Safari → WebKit
Chrome → Blink (a fork of WebKit).
A good documentation about WebEngines especially webKit and its developers you can read at:
WebKit

Resources