consolidating style parsing

Both inline style declarations and the contents of <style> elements are
now validated using the same internal method.