Skip to content

Instantly share code, notes, and snippets.

@mabster
Created January 28, 2020 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabster/07cfbfce648f7ce2763b18ccd35cab89 to your computer and use it in GitHub Desktop.
Save mabster/07cfbfce648f7ce2763b18ccd35cab89 to your computer and use it in GitHub Desktop.
Office UI Fabric Core Icon Alignment
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/11.0.0/css/fabric.min.css" />
</head>
<body class="ms-Fabric" dir="ltr">
<p class="ms-fontSize-12" style="line-height: 20px;"><i class="ms-Icon ms-Icon--Calendar" aria-hidden="true"></i> Due 22/03/2020</p>
<p class="ms-fontSize-12"><i class="ms-Icon ms-Icon--Calendar" aria-hidden="true"></i> Due 22/03/2020</p>
</body>
</html>
@mabster
Copy link
Author

mabster commented Jan 28, 2020

Wrapping the text in a element and adding style like:

p * { vertical-align: middle; }

... does work, but I don't understand why I have to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment