/** Converts a {@link SafeStyle} into a Soy {@link SanitizedContent} of kind CSS. */ public static SanitizedContent fromSafeStyle(SafeStyle style) { return SanitizedContent.create(style.getSafeStyleString(), ContentKind.CSS); }
/** Sets the {@code style} attribute for this element. */ public SafeHtmlBuilder setStyle(SafeStyle value) { return setAttribute("style", value.getSafeStyleString()); }
/** Converts a {@link SafeStyle} into a Soy {@link SanitizedContent} of kind CSS. */ public static SanitizedContent fromSafeStyle(SafeStyle style) { return SanitizedContent.create(style.getSafeStyleString(), ContentKind.CSS); }
/** Converts a {@link SafeStyleProto} into a Soy {@link SanitizedContent} of kind CSS. */ public static SanitizedContent fromSafeStyleProto(SafeStyleProto style) { return SanitizedContent.create( SafeStyles.fromProto(style).getSafeStyleString(), ContentKind.CSS); }
/** Converts a {@link SafeStyleProto} into a Soy {@link SanitizedContent} of kind CSS. */ public static SanitizedContent fromSafeStyleProto(SafeStyleProto style) { return SanitizedContent.create( SafeStyles.fromProto(style).getSafeStyleString(), ContentKind.CSS); }
/** * Serializes a SafeStyle into its opaque protocol message representation. * * <p>Protocol message forms of this type are intended to be opaque. The fields of the returned * protocol message should be considered encapsulated and are not intended for direct inspection * or manipulation. Protocol messages can be converted back into a SafeStyle using * {@link #fromProto(SafeStyleProto)}. */ public static SafeStyleProto toProto(SafeStyle style) { return SafeStyleProto.newBuilder() .setPrivateDoNotAccessOrElseSafeStyleWrappedValue(style.getSafeStyleString()).build(); }