In Chrome, CSS automatic hyphens are displayed as question mark symbols

On my website, I have implemented automatic hyphenation using CSS:

article > p,
article > li {
  -o-hyphens: auto;
  -o-hyphenate-limit-before: 3;
  -o-hyphenate-limit-after: 3;
  -o-hyphenate-limit-chars: 6 3 3;
  -o-hyphenate-limit-lines: 2;
  -o-hyphenate-limit-last: always;
  -o-hyphenate-limit-zone: 8%;

  // Other browser prefixes and hyphenation properties

}

The hyphenation seems to work fine in Safari and Firefox as shown in the images below:

https://i.stack.imgur.com/LUVEM.jpg

However, it is not working as expected in Chrome and Opera as seen here:

https://i.stack.imgur.com/CIGSW.jpg

I am using Gatsby JS for my website, and UTF-8 encoding is correctly set up.

Upon researching the issue, I found similar problems faced by others. However, I could not find anyone experiencing this specific issue only in Chromium browsers.

CSS hyphenation typically functions better in Safari and Firefox, but the difference in behavior across browsers is unexpected. What could be causing this issue and how can it be resolved? Why is this happening exclusively in Chromium browsers?

Answer №1

If you're looking for answers to questions like this, a fantastic resource to check out is the website known as caniuse. For this particular inquiry, follow this link:

https://caniuse.com/css-hyphens

To address your specific issue, consider adjusting the lang attribute in your html tag.

<html lang="sv">

Ensuring the correct lang attribute is set is crucial for proper functionality of language features across various web browsers.

For further insights on hyphenation and language settings, explore this informative article:

In relation to Chromium experiencing this issue while other browsers do not, it is likely due to how each browser handles language values - with Chromium potentially not syncing them from the operating system. This behavior aligns with Chromium's approach of maintaining independence from its environment, making it a popular choice for testing compatibility.

Answer №2

It appears that the issue is due to a bug in Chromium on macOS, rather than any errors in my code.

Answer №3

In case this issue appears on Mac only and not on other platforms, it could possibly be related to . If not, I suggest reporting the problem at for assistance.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The text is not meticulously arranged within the designated span

My text-align (center) property doesn't seem to be working correctly with the following code snippet: <span class="info">&nbsp;i&nbsp;<span id="uitleg_itje">Bla bla. </span></span> The CSS for the info class is as fo ...

Is there a way to resolve the issue of my localStorage getting overridden on page refresh?

I am currently working on a simple React app and encountering an issue with the localStorage. Whenever I refresh the page, the todo list stored in the localStorage disappears. How can I ensure that the todos remain visible even after a refresh? Any sugges ...

Create a custom jQuery plugin that enables users to toggle checkboxes with the click of a button

Having trouble with my jQuery button code that is supposed to toggle associated checkboxes but ends up freezing the browser. I am in need of the following functionalities: 1) Clicking on "select all" should select all checkboxes. 2) Clicking on "select all ...

Troubles with basic jQuery hide and show functionalities

Hey there! I've been working on a project for the past couple of days and I'm having trouble with creating a slider effect using jQuery hide and show. It's strange because my code works perfectly fine with jquery-1.6.2.min.js, but when I swi ...

Is there a way to stop Material UI from dulling the color of my AppBar when using dark mode in my theme?

When I use mode: "dark" in my Material UI theme, it causes the color of my AppBar to become desaturated. Switching it to mode: "light" resolves this issue. This is how my theme is configured: const theme = createTheme({ palette: { ...

Is there a difference between innerHTML strings and their corresponding strings in JavaScript?

I am facing an issue with a code snippet that seems to have an unusual error. The following code is a simplified version to demonstrate the strange behavior. <html> <head> <script type = "text/javascript"> window.onload = fun ...

Having trouble storing data accurately in local storage using React

I implemented a combination of useContext and useEffect to store useContext data in local storage, but I am facing challenges due to conditional rendering. The scenario involves displaying a sign-in button when the user is not logged in and a log-out butto ...

Unpacking Functions within Embedded Redux Reducer

My current challenge involves dispatching an action that has the following structure: { type: "TOGGLE_FARA", fara: true, id: "5d20d019cf42731c8f706db1" } The purpose of this action is to modify the "enabled" property within my "fara" state. The configura ...

Does starting the rails server impact the test outcome?

Regarding this inquiry, I encountered an unusual situation. ruby on rails - Log in test fails with RSpec / Capybara / Poltergeist - Stack Overflow Simply running the test bin/rspec spec/features/spec.rb 11871 spring server | myapp | started 32 secs ago ...

AngularJS ui-router in HTML5 mode is a powerful combination that allows

Hey, I'm looking to implement HTML5 mode in my project. Here's how my file structure looks: mypage.de/mysub I can only make changes within the "mysub" directory. So far, I've added the following into my index.html: <base href="/mysub/ ...

Get the file from the web browser

Hey there, greetings from my part of the world. I have some straightforward questions that I'm not sure have simple answers. Currently, I am working on a web application using the JSP/Servlet framework. In this app, users can download a flat text fil ...

Halt hovering effect after a set duration using CSS or Vanilla JavaScript

Looking for a way to create a hover effect that lasts for a specific duration before stopping. I want the background to appear for just 1 second, even if the mouse remains hovering. Preferably using CSS or JavaScript only, without jQuery. To see my curren ...

What is the best method for incorporating ink/ripple effect into an element?

Suppose there is an albums.jsx file containing the following: import ripple from 'material-ui/ripple' In order to apply a ripple effect to an element, you can use the following code: return <div className={ripple}><div> This will ...

What's causing this MUI React data grid component to be rendered multiple times?

I have developed a wrapper for the MUI Data Grid Component as portrayed: Selection.tsx: import * as React from 'react'; import { DataGrid, faIR, GridSelectionModel } from '@mui/x-data-grid'; import type {} from '@mui/x-data-grid/t ...

Tips for creating a responsive background image without excessive scaling:

I'm currently working on a website with a focus on responsibility, and I've incorporated 'waves' SVG images as a background-image. The issue arises when viewing the site on smaller screens, such as mobile devices, where the background a ...

How can I create a static navigation bar and sidebar using Bootstrap 4?

Currently, I am utilizing HTML, Javascript, Bootstrap, and CSS to develop a fixed navbar and sidebar for our system. My objective is to ensure that the navbar and sidebar remain fixed even when users scroll down the page, while also maintaining responsiven ...

I currently have two responsive menus and I'm trying to figure out how to modify the javascript so that when one menu is opened, the other

I am facing an issue with my responsive menus on a webpage, similar to the example provided in the jsfiddle link below. Currently, when one menu is open and I click on another, both remain open. How can I modify the JavaScript code so that when one menu op ...

Tips for serving images locally instead of using an online URL when exporting with Next.js static:

I've encountered an issue where multiple images pulled from an online source are not being included in my export when I start the process. The image URLs are stored as strings online, but I want them to be saved locally and exported that way instead o ...

Processing and extracting data from a native .csv file in React by parsing it line by line

I have a file saved on my local machine that I need to read. My react application is built using create-react-app. const csv =require('/path/to/csv') The file is in .csv format and looks like this: IBM, .025 GE, .33 etc I want to read this fi ...

downsides of scrolling text functionality

Sure, it may seem evil. But what makes it so? Is it because all browsers support it? Which aspx asp.net controls are restricted in this tag? What are the reasons for avoiding this tag? ...