Coverage Report

Created: 2026-01-10 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wt/src/Wt/WLinkedCssStyleSheet.C
Line
Count
Source
1
/*
2
 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
3
 *
4
 * See the LICENSE file for terms of use.
5
 */
6
7
#include "Wt/WApplication.h"
8
#include "Wt/WLinkedCssStyleSheet.h"
9
#include "Wt/WStringStream.h"
10
11
namespace Wt {
12
13
WLinkedCssStyleSheet::WLinkedCssStyleSheet(const WLink& link,
14
                                           const std::string& media)
15
0
  : link_(link),
16
0
    media_(media)
17
0
{ }
18
19
void WLinkedCssStyleSheet::cssText(WStringStream& out) const
20
0
{
21
0
  WApplication *app = WApplication::instance();
22
0
  out << "@import url(\"" << link_.resolveUrl(app) << "\")";
23
24
0
  if (!media_.empty() && media_ != "all")
25
0
    out << " " << media_;
26
0
  out << ";\n";
27
0
}
28
29
} // namespace Wt