Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why does this local font have "../../" in its source url?

This is the src url in a font-face for a local font in a wordpress theme. I can’t for the life of me figure this out. Searching on google brings me no results.

@font-face {
    font-family: "Example";
    src: url("../../fonts/example.eot");
    src: url("../../fonts/example.eot#iefix") format("embedded-opentype"), url("../../fonts/example.woff2") format("woff2"), url("../../fonts/example.woff") format("woff"), url("../../fonts/example.ttf") format("truetype"), url("../../fonts/example.svg#Example") format("svg");
    font-weight: normal;
    font-style: normal;
}

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Two dots like that in a relative url mean "up to next parent directory" and you can use this more than one time to climb ever higher in the directory structure.

If you had a folder tree like this:

A/
  B/
  C/
     - File In C Folder.css
  D/
      E/
      F/
         - File In F Folder.css

From the location of File In F Folder.css if you wanted to refer to the location of File In C Folder.css you would first walk "up" two levels to A and then back down to C.

So the path would be

../../C/File In C Folder.css
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading