Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Clientlibs, Media Queries and Sighlty

Avatar

Avatar
Validate 1
Level 2
Reini-
Level 2

Likes

4 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Reini-
Level 2

Likes

4 likes

Total Posts

21 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
Reini-
Level 2

15-10-2015

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
Employee
justin_at_adobe
Employee

Likes

76 likes

Total Posts

522 posts

Correct Reply

259 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Boost 50
Employee
justin_at_adobe
Employee

Likes

76 likes

Total Posts

522 posts

Correct Reply

259 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile
justin_at_adobe
Employee

15-10-2015

Reinhard-

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

Regards,

Justin

Answers (0)