Using PureCSS I have noticed that elements with pure-button class differs in width based on browser.
Using the following example:
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous">
</head>
<body>
<div class="pure-button">yolo</div>
</body>
</html>
The div on Chrome is 61.36 pixels width but on Firefox it is wider and takes 65.8433 pixels.
My questions are: What makes the difference and how can I make them identical?
I have already tried setting width via style property but it "cuts" the right part of a padding.
Update 1: Thanks to Peter James answer I have realized that the described problem only occurs on my installation of Linux MX. Firefox on Windows 10 renders the div the same way as other browsers.
I copied your code across to SO's code snippet and ran it and then looked at it in the inspector.
Here are two screenshots of the div sizes:
Chrome:
Google:
I am on a Windows 10 PC using Chrome Version 104.0.5112.81 and Firefox Version 103.0.2
The sizes are:
Chrome: 61.36 x 34andFirefox: 61.35 x 34Obviously, you can just create your own
widthclass and set the width yourself (as shown in the code snippet below), but this defeats the purpose of using a cross-platform library. Whether this is a browser issue or a Pure.css issue is difficult to say. I checked the Pure.css documentation on Github and they state that it has been tested on: IE 10+, iOS 12+, Android 6+ and the latest stable versions of Firefox, Chrome, and Safari.