Import Ubuntu font to prose.sh

· Alberto's Blog!

How to import Ubuntu font using only CSS.

Problem #

prose.sh does not support JavaScript. Using only CSS, we need to install Ubuntu font family.

Solution #

Use the CSS @import rule as follows:

1@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap');

Explanation #

The @import rule is used to import external stylesheets into a CSS file. In this case, we are importing the Ubuntu font family from Google Fonts.

last updated: