내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Adding print media to cq:includeClientLib for CSS file

Avatar

Level 1

Hi,

Is it possible to add the print media to the CSS clientlib include in anyway.

<link rel="stylesheet" type="text/css" href="print.css" media="print">

I don't want to call the print css file separately, I want to add it through cq:includeClientLib only.

Thanks,

Bala

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Administrator

Hi 

As mentioned by Praveen and Scott, we could not add it directly.

You need to add it separate CSS file or existing file like:-

@media not|only mediatype and (expressions) {
    CSS-Code;
}

is same as

<link rel="stylesheet" media="mediatype and|not|only (expressions)" href="print.css">

 

I hope this would help you.

~kautuk



Kautuk Sahni

원본 게시물의 솔루션 보기

5 답변 개

Avatar

Level 1

I would like to know the same.

Avatar

Level 10

I dont think cq:includeClientLib will help you to included print CSSas there is not separate parameter for this. The whole purpose of this is to include your client libs categories. May be you can create a client lib which has only print css and load it based on template

Avatar

Level 10

Agreed with Praveen - load that CSS into a separate ClientLib and call when needed. 

Avatar

정확한 답변 작성자:
Administrator

Hi 

As mentioned by Praveen and Scott, we could not add it directly.

You need to add it separate CSS file or existing file like:-

@media not|only mediatype and (expressions) {
    CSS-Code;
}

is same as

<link rel="stylesheet" media="mediatype and|not|only (expressions)" href="print.css">

 

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Employee

+1 to Kautak's solution