30
April
How can add externalcss in Drupal 8 ?
Post following format in libraries.yml, for example my theme name is customtheme so the file will be 'customtheme.libraries.yml' in theme folder
css: theme: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css': { type: external, minified: true } 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap': { type: external, minified: true } 'https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700|Open+Sans:400,600,700': { type: external, minified: true } 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css': { type: external, minified: true }
© 2023.ZedAngle. All Rights Reserved.