Clientlibs, Media Queries and Sighlty | Community
Skip to main content
Level 2
October 16, 2015
Solved

Clientlibs, Media Queries and Sighlty

  • October 16, 2015
  • 1 reply
  • 1221 views

Hi,

is it possible to add css media queries with sightly and clientlibs functionality?

The result should be:

    <link rel="stylesheet" href="https://forums.adobe.com/etc/designs/website/clientlibsDesktop.min.css" type="text/css"/>
    <link rel="stylesheet" media="screen and (min-width: 600px) and (max-width: 800px)" href="https://forums.adobe.com/etc/designs/website/clientlibsTablet.min.css" type="text/css"/>
    <link rel="stylesheet" media="screen and (max-width: 599px)" href="https://forums.adobe.com/etc/designs/website/clientlibsMobile.min.css" type="text/css"/>

 

Its ease to get the first line:

<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">

    <link data-sly-call="${clientLib.css @ categories='clientlibsDesktop'}" data-sly-unwrap/>

</head>

 

But how can I add the media queries to the next two lines?

 

regards

Reinhard

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

Reinhard-

When using clientlibs, you want to put the media series inside the CSS files.

Regards,

Justin

1 reply

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Reinhard-

When using clientlibs, you want to put the media series inside the CSS files.

Regards,

Justin