Giter Site home page Giter Site logo

less-src-replace's People

Contributors

kostik-noir avatar miloszsobczak avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

less-src-replace's Issues

Incorrect processing of URLs for font-face

As an example

Original code from bootstrap. Pay attention to the values of "src" on the lines that contains

  • format('embedded-opentype')
  • format('svg')
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('@{icon-font-path}@{icon-font-name}.eot');
  src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),
       url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),
       url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),
       url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),
       url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');
}

Wrong result

  • the line which contains "format('embedded-opentype')" does not have suffix "?#iefix"
  • the line which contains "format('svg')" contains incorrect URL
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('css-assets/99718da6e37fa5ecd783c05da5776a27-glyphicons-halflings-regular.eot');
  src: url('css-assets/99718da6e37fa5ecd783c05da5776a27-glyphicons-halflings-regular.eot') format('embedded-opentype'), 
         url('css-assets/35235a935962823d0e87d0e906dbd4fc-glyphicons-halflings-regular.woff2') format('woff2'), 
         url('css-assets/2d3fceb5714523e1a20953bab085993b-glyphicons-halflings-regular.woff') format('woff'), 
         url('css-assets/88e79c0ab6e846d320a558acfced1a1f-glyphicons-halflings-regular.ttf') format('truetype'), 
         url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

Expected

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('css-assets/99718da6e37fa5ecd783c05da5776a27-glyphicons-halflings-regular.eot');
  src: url('css-assets/99718da6e37fa5ecd783c05da5776a27-glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
       url('css-assets/35235a935962823d0e87d0e906dbd4fc-glyphicons-halflings-regular.woff2') format('woff2'),
       url('css-assets/2d3fceb5714523e1a20953bab085993b-glyphicons-halflings-regular.woff') format('woff'),
       url('css-assets/88e79c0ab6e846d320a558acfced1a1f-glyphicons-halflings-regular.ttf') format('truetype'),
       url('css-assets/21406e5a5866a32b2cc21bb7f9083262-glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.