Skip to content

Commit

Permalink
Revert "Add a deprecation warning for @import's that resolved .css fi…
Browse files Browse the repository at this point in the history
…les"

This reverts commit fd989f6.
  • Loading branch information
xzyfer committed Jul 2, 2018
1 parent 55abf76 commit 9a211eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
8 changes: 0 additions & 8 deletions src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,6 @@ namespace Sass {
// process the resolved entry
else if (resolved.size() == 1) {
bool use_cache = c_importers.size() == 0;
if (resolved[0].deprecated) {
// emit deprecation warning when import resolves to a .css file
deprecated(
"Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.",
"Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.",
true, pstate
);
}
// use cache for the resource loading
if (use_cache && sheets.count(resolved[0].abs_path)) return resolved[0];
// try to read the content of the resolved file entry
Expand Down
4 changes: 2 additions & 2 deletions src/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ namespace Sass {
for(auto ext : d_exts) {
rel_path = join_paths(base, "_" + name + ext);
abs_path = join_paths(root, rel_path);
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
}
// next test plain name with d_exts
for(auto ext : d_exts) {
rel_path = join_paths(base, name + ext);
abs_path = join_paths(root, rel_path);
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
}
// nothing found
return includes;
Expand Down
7 changes: 1 addition & 6 deletions src/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,9 @@ namespace Sass {
public:
// resolved absolute path
std::string abs_path;
// is a deprecated file type
bool deprecated;
public:
Include(const Importer& imp, std::string abs_path, bool deprecated)
: Importer(imp), abs_path(abs_path), deprecated(deprecated)
{ }
Include(const Importer& imp, std::string abs_path)
: Importer(imp), abs_path(abs_path), deprecated(false)
: Importer(imp), abs_path(abs_path)
{ }
};

Expand Down

0 comments on commit 9a211eb

Please sign in to comment.