如何在Polymer中设置flex-shrink:0

时间:2016-11-24 09:52:08

标签: polymer flexbox

目前,我的班级有以下代码。我想flex-shrink: 0;怎么做? Documentation--layout-flex-auto : Sets flex flex-basis to auto and flex-grow and flex-shrink to 1.

@apply(--layout-flex);
@apply(--layout-vertical);

1 个答案:

答案 0 :(得分:1)

如果两者具有相同的specificity,则稍后出现的CSS规则会覆盖之前的规则。

要覆盖mixin中的public class SMSRead extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView view = new TextView(this); Uri uriSMSURI = Uri.parse("content://sms/inbox"); Cursor cur = getContentResolver().query(uriSMSURI, null, null, null,null); String sms = ""; while (cur.moveToNext()) { sms += "From :" + cur.getString(2) + " : " + cur.getString(11)+"\n"; } view.setText(sms); setContentView(view); } } 值,只需将您的flex-shrink设置放在 mixin之后:

flex-shrink