% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xml_utils.R
\name{svg_dimension}
\alias{svg_dimension}
\title{Read a single root SVG dimension robustly}
\usage{
svg_dimension(
  svg_content,
  attr = c("width", "height"),
  prefer = c("attr", "viewBox")
)
}
\arguments{
\item{svg_content}{SVG string.}

\item{attr}{\code{"width"} or \code{"height"}.}

\item{prefer}{Which source to try first: \code{"attr"} (width/height attribute,
the default) or \code{"viewBox"}.}
}
\value{
Numeric value in CSS px, or \code{NA_real_} if not found.
}
\description{
Read a single root SVG dimension robustly
}
\keyword{internal}
