\begin{quote}
Detect/remove browser hacks from CSS files. \end{quote}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29344}{}\doxysection{Install}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29344}
With \href{https://npmjs.org/package/stylehacks}{\texttt{ npm}} do\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install stylehacks -\/-\/save }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29345}{}\doxysection{Example}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29345}
In its default mode, stylehacks will remove hacks from your CSS file, based on the browsers that you wish to support.\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29346}{}\doxysubsection{Input}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29346}

\begin{DoxyCode}{0}
\DoxyCodeLine{h1 \{}
\DoxyCodeLine{    \_color: white;}
\DoxyCodeLine{    color: rgba(255, 255, 255, 0.5);}
\DoxyCodeLine{\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29347}{}\doxysubsection{Output}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29347}

\begin{DoxyCode}{0}
\DoxyCodeLine{h1 \{}
\DoxyCodeLine{    color: rgba(255, 255, 255, 0.5);}
\DoxyCodeLine{\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29348}{}\doxysection{API}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29348}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29349}{}\doxysubsection{$<$tt$>$stylehacks.\+detect(node)$<$/tt$>$}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29349}
Type\+: {\ttfamily function} ~\newline
 Returns\+: {\ttfamily boolean}

This method will take any Post\+CSS {\itshape node}, run applicable plugins depending on its type, then will return a boolean depending on whether it found any of the supported hacks. For example, if the {\ttfamily decl} node found below is passed to the {\ttfamily detect} function, it will return {\ttfamily true}. But if the {\ttfamily rule} node is passed, it will return {\ttfamily false} instead.


\begin{DoxyCode}{0}
\DoxyCodeLine{h1 \{ \_color: red \} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29350}{}\doxysubsection{$<$tt$>$stylehacks.\+process(css, \mbox{[}options\mbox{]}).\+then(function(result) \{\})$<$/tt$>$}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29350}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29351}{}\doxysubsubsection{options}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29351}
\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29352}{}\doxyparagraph{lint}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29352}
Type\+: {\ttfamily boolean} ~\newline
 Default\+: {\ttfamily false}

If lint mode is enabled, stylehacks will not remove hacks from the CSS; instead, it will add warnings to {\ttfamily Result\#messages}.\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29353}{}\doxysubsection{$<$tt$>$postcss(\mbox{[} stylehacks(opts) \mbox{]})$<$/tt$>$}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29353}
stylehacks can also be consumed as a Post\+CSS plugin. See the \href{https://github.com/postcss/postcss\#usage}{\texttt{ documentation}} for examples for your environment.\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29354}{}\doxysection{Related}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29354}
stylehacks works well with your existing Post\+CSS setup\+:


\begin{DoxyItemize}
\item \href{https://github.com/stylelint/stylelint}{\texttt{ stylelint}} -\/ Comprehensive \& modern CSS linter, to ensure that your code style rules are respected.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29355}{}\doxysection{Contributing}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29355}
Pull requests are welcome. If you add functionality, then please add unit tests to cover it.\hypertarget{md_sfcode_node_modules_stylehacks_README_autotoc_md29356}{}\doxysection{License}\label{md_sfcode_node_modules_stylehacks_README_autotoc_md29356}
MIT © \href{http://beneb.info}{\texttt{ Ben Briggs}} 