Skip to content

Commit 9a211eb

Browse files
committed
Revert "Add a deprecation warning for @import's that resolved .css files"
This reverts commit fd989f6.
1 parent 55abf76 commit 9a211eb

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/context.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,6 @@ namespace Sass {
365365
// process the resolved entry
366366
else if (resolved.size() == 1) {
367367
bool use_cache = c_importers.size() == 0;
368-
if (resolved[0].deprecated) {
369-
// emit deprecation warning when import resolves to a .css file
370-
deprecated(
371-
"Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.",
372-
"Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.",
373-
true, pstate
374-
);
375-
}
376368
// use cache for the resource loading
377369
if (use_cache && sheets.count(resolved[0].abs_path)) return resolved[0];
378370
// try to read the content of the resolved file entry

src/file.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,13 @@ namespace Sass {
354354
for(auto ext : d_exts) {
355355
rel_path = join_paths(base, "_" + name + ext);
356356
abs_path = join_paths(root, rel_path);
357-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
357+
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
358358
}
359359
// next test plain name with d_exts
360360
for(auto ext : d_exts) {
361361
rel_path = join_paths(base, name + ext);
362362
abs_path = join_paths(root, rel_path);
363-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
363+
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
364364
}
365365
// nothing found
366366
return includes;

src/file.hpp

Lines changed: 1 addition & 6 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

0 commit comments

Comments
 (0)