Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 5d8be50

Browse files
committed
Remove raw css imports
1 parent cb7de6b commit 5d8be50

File tree

3 files changed

+3
-30
lines changed

3 files changed

+3
-30
lines changed

src/context.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,6 @@ namespace Sass {
411411
// process the resolved entry
412412
else if (resolved.size() == 1) {
413413
bool use_cache = c_importers.size() == 0;
414-
if (resolved[0].deprecated) {
415-
// emit deprecation warning when import resolves to a .css file
416-
deprecated(
417-
"Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.",
418-
"Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.",
419-
true, pstate
420-
);
421-
}
422414
// use cache for the resource loading
423415
if (use_cache && sheets.count(resolved[0].abs_path)) return resolved[0];
424416
// try to read the content of the resolved file entry

src/file.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ namespace Sass {
326326
// (4) given + extension
327327
// (5) given + _index.scss
328328
// (6) given + _index.sass
329-
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts, const std::vector<std::string>& d_exts)
329+
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts)
330330
{
331331
std::string filename = join_paths(root, file);
332332
// split the filename
@@ -353,18 +353,6 @@ namespace Sass {
353353
abs_path = join_paths(root, rel_path);
354354
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
355355
}
356-
// next test d_exts plus underscore
357-
for(auto ext : d_exts) {
358-
rel_path = join_paths(base, "_" + name + ext);
359-
abs_path = join_paths(root, rel_path);
360-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
361-
}
362-
// next test plain name with d_exts
363-
for(auto ext : d_exts) {
364-
rel_path = join_paths(base, name + ext);
365-
abs_path = join_paths(root, rel_path);
366-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
367-
}
368356
// index files
369357
if (includes.size() == 0) {
370358
// ignore directories that look like @import'able filename

src/file.hpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,9 @@ namespace Sass {
8989
public:
9090
// resolved absolute path
9191
std::string abs_path;
92-
// is a deprecated file type
93-
bool deprecated;
9492
public:
95-
Include(const Importer& imp, std::string abs_path, bool deprecated)
96-
: Importer(imp), abs_path(abs_path), deprecated(deprecated)
97-
{ }
9893
Include(const Importer& imp, std::string abs_path)
99-
: Importer(imp), abs_path(abs_path), deprecated(false)
94+
: Importer(imp), abs_path(abs_path)
10095
{ }
10196
};
10297

@@ -127,11 +122,9 @@ namespace Sass {
127122
namespace File {
128123

129124
static std::vector<std::string> defaultExtensions = { ".scss", ".sass" };
130-
static std::vector<std::string> deprecatedExtensions = { ".css" };
131125

132126
std::vector<Include> resolve_includes(const std::string& root, const std::string& file,
133-
const std::vector<std::string>& exts = defaultExtensions,
134-
const std::vector<std::string>& d_exts = deprecatedExtensions);
127+
const std::vector<std::string>& exts = defaultExtensions);
135128

136129
}
137130

0 commit comments

Comments
 (0)